diff options
Diffstat (limited to 'weed/wdclient/masterclient.go')
| -rw-r--r-- | weed/wdclient/masterclient.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/weed/wdclient/masterclient.go b/weed/wdclient/masterclient.go index 2d0b00b76..8851c3bd6 100644 --- a/weed/wdclient/masterclient.go +++ b/weed/wdclient/masterclient.go @@ -19,6 +19,7 @@ type MasterClient struct { FilerGroup string clientType string clientHost pb.ServerAddress + rack string currentMaster pb.ServerAddress masters map[string]pb.ServerAddress grpcDialOption grpc.DialOption @@ -29,7 +30,7 @@ type MasterClient struct { OnPeerUpdate func(update *master_pb.ClusterNodeUpdate, startFrom time.Time) } -func NewMasterClient(grpcDialOption grpc.DialOption, filerGroup string, clientType string, clientHost pb.ServerAddress, clientDataCenter string, masters map[string]pb.ServerAddress) *MasterClient { +func NewMasterClient(grpcDialOption grpc.DialOption, filerGroup string, clientType string, clientHost pb.ServerAddress, clientDataCenter string, rack string, masters map[string]pb.ServerAddress) *MasterClient { return &MasterClient{ FilerGroup: filerGroup, clientType: clientType, @@ -152,6 +153,8 @@ func (mc *MasterClient) tryConnectToMaster(master pb.ServerAddress) (nextHintedL if err = stream.Send(&master_pb.KeepConnectedRequest{ FilerGroup: mc.FilerGroup, + DataCenter: mc.DataCenter, + Rack: mc.rack, ClientType: mc.clientType, ClientAddress: string(mc.clientHost), Version: util.Version(), |
