replication_sink.go 687 B

123456789101112131415161718192021
  1. package sink
  2. import (
  3. "github.com/chrislusf/seaweedfs/weed/pb/filer_pb"
  4. "github.com/chrislusf/seaweedfs/weed/replication/source"
  5. "github.com/chrislusf/seaweedfs/weed/util"
  6. )
  7. type ReplicationSink interface {
  8. GetName() string
  9. Initialize(configuration util.Configuration, prefix string) error
  10. DeleteEntry(key string, isDirectory, deleteIncludeChunks bool) error
  11. CreateEntry(key string, entry *filer_pb.Entry) error
  12. UpdateEntry(key string, oldEntry *filer_pb.Entry, newParentPath string, newEntry *filer_pb.Entry, deleteIncludeChunks bool) (foundExistingEntry bool, err error)
  13. GetSinkToDirectory() string
  14. SetSourceFiler(s *source.FilerSource)
  15. }
  16. var (
  17. Sinks []ReplicationSink
  18. )