aboutsummaryrefslogtreecommitdiff
path: root/weed/cluster/cluster.go
diff options
context:
space:
mode:
authorguosj <515878133@qq.com>2022-04-19 09:25:32 +0800
committerguosj <515878133@qq.com>2022-04-19 09:25:32 +0800
commit82ee31965dd7a1ad2d348c7e9dadb254744bf9b0 (patch)
tree593eb933dffc877010c761b2c55ec6c73875e9a3 /weed/cluster/cluster.go
parent5c9a3bb8cf68ed99acb53dd548c92b54744d7fd7 (diff)
parente6ebafc094dc0ce0e3b0a68d7735f52a544bc479 (diff)
downloadseaweedfs-82ee31965dd7a1ad2d348c7e9dadb254744bf9b0.tar.xz
seaweedfs-82ee31965dd7a1ad2d348c7e9dadb254744bf9b0.zip
Merge branch 'master' of https://github.com/chrislusf/seaweedfs into chrislusf-master
Diffstat (limited to 'weed/cluster/cluster.go')
-rw-r--r--weed/cluster/cluster.go25
1 files changed, 22 insertions, 3 deletions
diff --git a/weed/cluster/cluster.go b/weed/cluster/cluster.go
index fa01bd03d..3cff13724 100644
--- a/weed/cluster/cluster.go
+++ b/weed/cluster/cluster.go
@@ -9,9 +9,10 @@ import (
)
const (
- MasterType = "master"
- FilerType = "filer"
- BrokerType = "broker"
+ MasterType = "master"
+ VolumeServerType = "volumeServer"
+ FilerType = "filer"
+ BrokerType = "broker"
)
type ClusterNode struct {
@@ -80,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
}
@@ -119,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
}