2018-09-23 07:40:36 +00:00
|
|
|
package sink
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/chrislusf/seaweedfs/weed/pb/filer_pb"
|
|
|
|
"github.com/chrislusf/seaweedfs/weed/replication/source"
|
2018-10-04 06:36:52 +00:00
|
|
|
"github.com/chrislusf/seaweedfs/weed/util"
|
2018-09-23 07:40:36 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
type ReplicationSink interface {
|
2018-10-04 06:36:52 +00:00
|
|
|
GetName() string
|
2020-01-29 17:09:55 +00:00
|
|
|
Initialize(configuration util.Configuration, prefix string) error
|
2020-09-09 18:21:23 +00:00
|
|
|
DeleteEntry(key string, isDirectory, deleteIncludeChunks bool, signatures []int32) error
|
|
|
|
CreateEntry(key string, entry *filer_pb.Entry, signatures []int32) error
|
|
|
|
UpdateEntry(key string, oldEntry *filer_pb.Entry, newParentPath string, newEntry *filer_pb.Entry, deleteIncludeChunks bool, signatures []int32) (foundExistingEntry bool, err error)
|
2018-09-23 07:40:36 +00:00
|
|
|
GetSinkToDirectory() string
|
|
|
|
SetSourceFiler(s *source.FilerSource)
|
2021-03-01 00:19:03 +00:00
|
|
|
IsIncremental() bool
|
2018-09-23 07:40:36 +00:00
|
|
|
}
|
2018-10-04 06:36:52 +00:00
|
|
|
|
|
|
|
var (
|
|
|
|
Sinks []ReplicationSink
|
|
|
|
)
|