mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-11-30 15:19:01 +08:00
22 lines
634 B
Go
22 lines
634 B
Go
package sink
|
|
|
|
import (
|
|
"github.com/chrislusf/seaweedfs/weed/pb/filer_pb"
|
|
"github.com/chrislusf/seaweedfs/weed/replication/source"
|
|
"github.com/chrislusf/seaweedfs/weed/util"
|
|
)
|
|
|
|
type ReplicationSink interface {
|
|
GetName() string
|
|
Initialize(configuration util.Configuration) error
|
|
DeleteEntry(key string, isDirectory, deleteIncludeChunks bool) error
|
|
CreateEntry(key string, entry *filer_pb.Entry) error
|
|
UpdateEntry(key string, oldEntry, newEntry *filer_pb.Entry, deleteIncludeChunks bool) (foundExistingEntry bool, err error)
|
|
GetSinkToDirectory() string
|
|
SetSourceFiler(s *source.FilerSource)
|
|
}
|
|
|
|
var (
|
|
Sinks []ReplicationSink
|
|
)
|