mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-12-01 07:49:02 +08:00
23 lines
769 B
Go
23 lines
769 B
Go
package sink
|
|
|
|
import (
|
|
"github.com/seaweedfs/seaweedfs/weed/pb/filer_pb"
|
|
"github.com/seaweedfs/seaweedfs/weed/replication/source"
|
|
"github.com/seaweedfs/seaweedfs/weed/util"
|
|
)
|
|
|
|
type ReplicationSink interface {
|
|
GetName() string
|
|
Initialize(configuration util.Configuration, prefix string) error
|
|
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)
|
|
GetSinkToDirectory() string
|
|
SetSourceFiler(s *source.FilerSource)
|
|
IsIncremental() bool
|
|
}
|
|
|
|
var (
|
|
Sinks []ReplicationSink
|
|
)
|