aboutsummaryrefslogtreecommitdiff
path: root/weed/replication
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/replication
parent2c9d4c8f43c1e95c75fc332ca83d19e33e5da3ac (diff)
downloadseaweedfs-e5fc35ed0c970fea060a5b3b7a3f5efb5af425d6.tar.xz
seaweedfs-e5fc35ed0c970fea060a5b3b7a3f5efb5af425d6.zip
change server address from string to a type
Diffstat (limited to 'weed/replication')
-rw-r--r--weed/replication/replicator.go2
-rw-r--r--weed/replication/sink/filersink/fetch_write.go2
2 files changed, 2 insertions, 2 deletions
diff --git a/weed/replication/replicator.go b/weed/replication/replicator.go
index d7e609c68..3e100497f 100644
--- a/weed/replication/replicator.go
+++ b/weed/replication/replicator.go
@@ -82,7 +82,7 @@ func (r *Replicator) Replicate(ctx context.Context, key string, message *filer_p
return r.sink.CreateEntry(key, message.NewEntry, message.Signatures)
}
-func ReadFilerSignature(grpcDialOption grpc.DialOption, filer string) (filerSignature int32, readErr error) {
+func ReadFilerSignature(grpcDialOption grpc.DialOption, filer pb.ServerAddress) (filerSignature int32, readErr error) {
if readErr = pb.WithFilerClient(filer, grpcDialOption, func(client filer_pb.SeaweedFilerClient) error {
if resp, err := client.GetFilerConfiguration(context.Background(), &filer_pb.GetFilerConfigurationRequest{}); err != nil {
return fmt.Errorf("GetFilerConfiguration %s: %v", filer, err)
diff --git a/weed/replication/sink/filersink/fetch_write.go b/weed/replication/sink/filersink/fetch_write.go
index e253eb96c..4c536b71c 100644
--- a/weed/replication/sink/filersink/fetch_write.go
+++ b/weed/replication/sink/filersink/fetch_write.go
@@ -91,7 +91,7 @@ func (fs *FilerSink) fetchAndWrite(sourceChunk *filer_pb.FileChunk, path string)
return fmt.Errorf("assign volume failure %v: %v", request, resp.Error)
}
- fileId, host, auth = resp.FileId, resp.Url, security.EncodedJwt(resp.Auth)
+ fileId, host, auth = resp.FileId, resp.Location.Url, security.EncodedJwt(resp.Auth)
return nil
})