mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-12-17 17:51:20 +08:00
refactoring
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
package sink
|
||||
package filersink
|
||||
|
||||
import (
|
||||
"context"
|
||||
@@ -1,4 +1,4 @@
|
||||
package sink
|
||||
package filersink
|
||||
|
||||
import (
|
||||
"context"
|
||||
@@ -11,14 +11,6 @@ import (
|
||||
"github.com/chrislusf/seaweedfs/weed/util"
|
||||
)
|
||||
|
||||
type ReplicationSink interface {
|
||||
DeleteEntry(key string, entry *filer_pb.Entry, deleteIncludeChunks bool) error
|
||||
CreateEntry(key string, entry *filer_pb.Entry) error
|
||||
UpdateEntry(key string, oldEntry, newEntry *filer_pb.Entry, deleteIncludeChunks bool) error
|
||||
GetSinkToDirectory() string
|
||||
SetSourceFiler(s *source.FilerSource)
|
||||
}
|
||||
|
||||
type FilerSink struct {
|
||||
filerSource *source.FilerSource
|
||||
grpcAddress string
|
||||
14
weed/replication/sink/replication_sink.go
Normal file
14
weed/replication/sink/replication_sink.go
Normal file
@@ -0,0 +1,14 @@
|
||||
package sink
|
||||
|
||||
import (
|
||||
"github.com/chrislusf/seaweedfs/weed/pb/filer_pb"
|
||||
"github.com/chrislusf/seaweedfs/weed/replication/source"
|
||||
)
|
||||
|
||||
type ReplicationSink interface {
|
||||
DeleteEntry(key string, entry *filer_pb.Entry, deleteIncludeChunks bool) error
|
||||
CreateEntry(key string, entry *filer_pb.Entry) error
|
||||
UpdateEntry(key string, oldEntry, newEntry *filer_pb.Entry, deleteIncludeChunks bool) error
|
||||
GetSinkToDirectory() string
|
||||
SetSourceFiler(s *source.FilerSource)
|
||||
}
|
||||
Reference in New Issue
Block a user