aboutsummaryrefslogtreecommitdiff
path: root/weed/cluster/cluster.go
diff options
context:
space:
mode:
authorleyou240 <leyou240@live.cn>2022-04-18 10:39:29 +0800
committerGitHub <noreply@github.com>2022-04-18 10:39:29 +0800
commit89eb87c1d16640030927af242b34eba47a149427 (patch)
treee7bbc83368c814afa3d6c81c808738f91e32afd4 /weed/cluster/cluster.go
parent846c56e005243aca99dd4500b5680f340525a320 (diff)
parentb597baf488fa4449d41ac2b78d421751f65f909e (diff)
downloadseaweedfs-89eb87c1d16640030927af242b34eba47a149427.tar.xz
seaweedfs-89eb87c1d16640030927af242b34eba47a149427.zip
Merge branch 'master' into slices.SortFunc
Diffstat (limited to 'weed/cluster/cluster.go')
-rw-r--r--weed/cluster/cluster.go18
1 files changed, 18 insertions, 0 deletions
diff --git a/weed/cluster/cluster.go b/weed/cluster/cluster.go
index e8752f4d9..3cff13724 100644
--- a/weed/cluster/cluster.go
+++ b/weed/cluster/cluster.go
@@ -81,6 +81,15 @@ func (cluster *Cluster) AddClusterNode(nodeType string, address pb.ServerAddress
},
}
case MasterType:
+ return []*master_pb.KeepConnectedResponse{
+ {
+ ClusterNodeUpdate: &master_pb.ClusterNodeUpdate{
+ NodeType: nodeType,
+ Address: string(address),
+ IsAdd: true,
+ },
+ },
+ }
}
return nil
}
@@ -120,6 +129,15 @@ func (cluster *Cluster) RemoveClusterNode(nodeType string, address pb.ServerAddr
}
}
case MasterType:
+ return []*master_pb.KeepConnectedResponse{
+ {
+ ClusterNodeUpdate: &master_pb.ClusterNodeUpdate{
+ NodeType: nodeType,
+ Address: string(address),
+ IsAdd: false,
+ },
+ },
+ }
}
return nil
}