mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-09-19 07:50:35 +08:00
master add separate grpc port
due to https://github.com/soheilhy/cmux/issues/64 fix https://github.com/chrislusf/seaweedfs/issues/820 fix https://github.com/chrislusf/seaweedfs/issues/840 fix https://github.com/chrislusf/seaweedfs/issues/841
This commit is contained in:
@@ -44,9 +44,14 @@ func toVolumeServerGrpcAddress(volumeServer string) (grpcAddress string, err err
|
||||
|
||||
func withMasterServerClient(masterServer string, fn func(masterClient master_pb.SeaweedClient) error) error {
|
||||
|
||||
masterGrpcAddress, parseErr := util.ParseServerToGrpcAddress(masterServer, 0)
|
||||
if parseErr != nil {
|
||||
return fmt.Errorf("failed to parse master grpc %v", masterServer)
|
||||
}
|
||||
|
||||
return util.WithCachedGrpcClient(func(grpcConnection *grpc.ClientConn) error {
|
||||
client := master_pb.NewSeaweedClient(grpcConnection)
|
||||
return fn(client)
|
||||
}, masterServer)
|
||||
}, masterGrpcAddress)
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user