seaweedfs/weed/replication/sub/notifications.go

19 lines
524 B
Go
Raw Normal View History

package sub
2018-09-17 15:27:56 +08:00
import (
"github.com/seaweedfs/seaweedfs/weed/pb/filer_pb"
"github.com/seaweedfs/seaweedfs/weed/util"
2018-09-17 15:27:56 +08:00
)
type NotificationInput interface {
// GetName gets the name to locate the configuration in sync.toml file
GetName() string
// Initialize initializes the file store
Initialize(configuration util.Configuration, prefix string) error
2021-01-27 03:08:44 +08:00
ReceiveMessage() (key string, message *filer_pb.EventNotification, onSuccessFn func(), onFailureFn func(), err error)
2018-09-17 15:27:56 +08:00
}
var (
NotificationInputs []NotificationInput
)