mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
refactoring
This commit is contained in:
parent
d923ba2206
commit
bc03233364
|
@ -3,8 +3,18 @@ package notification
|
||||||
import (
|
import (
|
||||||
"github.com/chrislusf/seaweedfs/weed/glog"
|
"github.com/chrislusf/seaweedfs/weed/glog"
|
||||||
"github.com/spf13/viper"
|
"github.com/spf13/viper"
|
||||||
|
"github.com/chrislusf/seaweedfs/weed/util"
|
||||||
|
"github.com/golang/protobuf/proto"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
type MessageQueue interface {
|
||||||
|
// GetName gets the name to locate the configuration in filer.toml file
|
||||||
|
GetName() string
|
||||||
|
// Initialize initializes the file store
|
||||||
|
Initialize(configuration util.Configuration) error
|
||||||
|
SendMessage(key string, message proto.Message) error
|
||||||
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
MessageQueues []MessageQueue
|
MessageQueues []MessageQueue
|
||||||
|
|
||||||
|
|
|
@ -1,14 +0,0 @@
|
||||||
package notification
|
|
||||||
|
|
||||||
import (
|
|
||||||
"github.com/chrislusf/seaweedfs/weed/util"
|
|
||||||
"github.com/golang/protobuf/proto"
|
|
||||||
)
|
|
||||||
|
|
||||||
type MessageQueue interface {
|
|
||||||
// GetName gets the name to locate the configuration in message_queue.toml file
|
|
||||||
GetName() string
|
|
||||||
// Initialize initializes the file store
|
|
||||||
Initialize(configuration util.Configuration) error
|
|
||||||
SendMessage(key string, message proto.Message) error
|
|
||||||
}
|
|
Loading…
Reference in a new issue