notifications.go 524 B

123456789101112131415161718
  1. package sub
  2. import (
  3. "github.com/seaweedfs/seaweedfs/weed/pb/filer_pb"
  4. "github.com/seaweedfs/seaweedfs/weed/util"
  5. )
  6. type NotificationInput interface {
  7. // GetName gets the name to locate the configuration in sync.toml file
  8. GetName() string
  9. // Initialize initializes the file store
  10. Initialize(configuration util.Configuration, prefix string) error
  11. ReceiveMessage() (key string, message *filer_pb.EventNotification, onSuccessFn func(), onFailureFn func(), err error)
  12. }
  13. var (
  14. NotificationInputs []NotificationInput
  15. )