aboutsummaryrefslogtreecommitdiff
path: root/weed/command/filer_remote_sync_buckets.go
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2021-09-12 22:47:52 -0700
committerChris Lu <chris.lu@gmail.com>2021-09-12 22:47:52 -0700
commite5fc35ed0c970fea060a5b3b7a3f5efb5af425d6 (patch)
tree3ad0436940263a24ac46d38a60dd1e35b2c1cdfe /weed/command/filer_remote_sync_buckets.go
parent2c9d4c8f43c1e95c75fc332ca83d19e33e5da3ac (diff)
downloadseaweedfs-e5fc35ed0c970fea060a5b3b7a3f5efb5af425d6.tar.xz
seaweedfs-e5fc35ed0c970fea060a5b3b7a3f5efb5af425d6.zip
change server address from string to a type
Diffstat (limited to 'weed/command/filer_remote_sync_buckets.go')
-rw-r--r--weed/command/filer_remote_sync_buckets.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/weed/command/filer_remote_sync_buckets.go b/weed/command/filer_remote_sync_buckets.go
index 70f9f49c1..73c8de1a9 100644
--- a/weed/command/filer_remote_sync_buckets.go
+++ b/weed/command/filer_remote_sync_buckets.go
@@ -32,12 +32,12 @@ func (option *RemoteSyncOptions) followBucketUpdatesAndUploadToRemote(filerSourc
processEventFnWithOffset := pb.AddOffsetFunc(eachEntryFunc, 3*time.Second, func(counter int64, lastTsNs int64) error {
lastTime := time.Unix(0, lastTsNs)
glog.V(0).Infof("remote sync %s progressed to %v %0.2f/sec", *option.filerAddress, lastTime, float64(counter)/float64(3))
- return remote_storage.SetSyncOffset(option.grpcDialOption, *option.filerAddress, option.bucketsDir, lastTsNs)
+ return remote_storage.SetSyncOffset(option.grpcDialOption, pb.ServerAddress(*option.filerAddress), option.bucketsDir, lastTsNs)
})
lastOffsetTs := collectLastSyncOffset(option, option.bucketsDir)
- return pb.FollowMetadata(*option.filerAddress, option.grpcDialOption, "filer.remote.sync",
+ return pb.FollowMetadata(pb.ServerAddress(*option.filerAddress), option.grpcDialOption, "filer.remote.sync",
option.bucketsDir, []string{filer.DirectoryEtcRemote}, lastOffsetTs.UnixNano(), 0, processEventFnWithOffset, false)
}
@@ -357,7 +357,7 @@ func extractBucketPath(bucketsDir, dir string) (util.FullPath, bool) {
func (option *RemoteSyncOptions) collectRemoteStorageConf() (err error) {
- if mappings, err := filer.ReadMountMappings(option.grpcDialOption, *option.filerAddress); err != nil {
+ if mappings, err := filer.ReadMountMappings(option.grpcDialOption, pb.ServerAddress(*option.filerAddress)); err != nil {
return err
} else {
option.mappings = mappings