You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
769 B

6 years ago
6 years ago
6 years ago
6 years ago
  1. package sink
  2. import (
  3. "github.com/seaweedfs/seaweedfs/weed/pb/filer_pb"
  4. "github.com/seaweedfs/seaweedfs/weed/replication/source"
  5. "github.com/seaweedfs/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, signatures []int32) error
  11. CreateEntry(key string, entry *filer_pb.Entry, signatures []int32) error
  12. UpdateEntry(key string, oldEntry *filer_pb.Entry, newParentPath string, newEntry *filer_pb.Entry, deleteIncludeChunks bool, signatures []int32) (foundExistingEntry bool, err error)
  13. GetSinkToDirectory() string
  14. SetSourceFiler(s *source.FilerSource)
  15. IsIncremental() bool
  16. }
  17. var (
  18. Sinks []ReplicationSink
  19. )