Browse Source

refactoring

pull/747/head
Chris Lu 6 years ago
parent
commit
bc03233364
  1. 10
      weed/notification/configuration.go
  2. 14
      weed/notification/message_queue.go

10
weed/notification/configuration.go

@ -3,8 +3,18 @@ package notification
import (
"github.com/chrislusf/seaweedfs/weed/glog"
"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 (
MessageQueues []MessageQueue

14
weed/notification/message_queue.go

@ -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…
Cancel
Save