seaweedfs/weed/replication/sink/replication_sink.go

22 lines
634 B
Go
Raw Normal View History

2018-09-23 15:40:36 +08:00
package sink
import (
"github.com/chrislusf/seaweedfs/weed/pb/filer_pb"
"github.com/chrislusf/seaweedfs/weed/replication/source"
2018-10-04 14:36:52 +08:00
"github.com/chrislusf/seaweedfs/weed/util"
2018-09-23 15:40:36 +08:00
)
type ReplicationSink interface {
2018-10-04 14:36:52 +08:00
GetName() string
Initialize(configuration util.Configuration) error
DeleteEntry(key string, isDirectory, deleteIncludeChunks bool) error
2018-09-23 15:40:36 +08:00
CreateEntry(key string, entry *filer_pb.Entry) error
2018-10-04 14:36:52 +08:00
UpdateEntry(key string, oldEntry, newEntry *filer_pb.Entry, deleteIncludeChunks bool) (foundExistingEntry bool, err error)
2018-09-23 15:40:36 +08:00
GetSinkToDirectory() string
SetSourceFiler(s *source.FilerSource)
}
2018-10-04 14:36:52 +08:00
var (
Sinks []ReplicationSink
)