mirror of
https://github.com/chrislusf/seaweedfs
synced 2024-09-10 02:50:35 +02:00
23 lines
746 B
Go
23 lines
746 B
Go
package sink
|
|
|
|
import (
|
|
"context"
|
|
"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(ctx context.Context, key string, isDirectory, deleteIncludeChunks bool) error
|
|
CreateEntry(ctx context.Context, key string, entry *filer_pb.Entry) error
|
|
UpdateEntry(ctx context.Context, key string, oldEntry *filer_pb.Entry, newParentPath string, newEntry *filer_pb.Entry, deleteIncludeChunks bool) (foundExistingEntry bool, err error)
|
|
GetSinkToDirectory() string
|
|
SetSourceFiler(s *source.FilerSource)
|
|
}
|
|
|
|
var (
|
|
Sinks []ReplicationSink
|
|
)
|