2018-09-23 15:40:36 +08:00
|
|
|
package sink
|
|
|
|
|
|
|
|
import (
|
2022-07-29 15:17:28 +08:00
|
|
|
"github.com/seaweedfs/seaweedfs/weed/pb/filer_pb"
|
|
|
|
"github.com/seaweedfs/seaweedfs/weed/replication/source"
|
|
|
|
"github.com/seaweedfs/seaweedfs/weed/util"
|
2018-09-23 15:40:36 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
type ReplicationSink interface {
|
2018-10-04 14:36:52 +08:00
|
|
|
GetName() string
|
2020-01-30 01:09:55 +08:00
|
|
|
Initialize(configuration util.Configuration, prefix string) error
|
2020-09-10 02:21:23 +08: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 15:40:36 +08:00
|
|
|
GetSinkToDirectory() string
|
|
|
|
SetSourceFiler(s *source.FilerSource)
|
2021-03-01 08:19:03 +08:00
|
|
|
IsIncremental() bool
|
2018-09-23 15:40:36 +08:00
|
|
|
}
|
2018-10-04 14:36:52 +08:00
|
|
|
|
|
|
|
var (
|
|
|
|
Sinks []ReplicationSink
|
|
|
|
)
|