MCPcopy Create free account
hub / github.com/apache/kvrocks-controller / AddNode

Method AddNode

store/cluster.go:120–125  ·  view source on GitHub ↗
(shardIndex int, addr, role, password string)

Source from the content-addressed store, hash-verified

118}
119
120func (cluster *Cluster) AddNode(shardIndex int, addr, role, password string) (*ClusterNode, error) {
121 if shardIndex < 0 || shardIndex >= len(cluster.Shards) {
122 return nil, consts.ErrIndexOutOfRange
123 }
124 return cluster.Shards[shardIndex].addNode(addr, role, password)
125}
126
127func (cluster *Cluster) RemoveNode(shardIndex int, nodeID string) error {
128 if shardIndex < 0 || shardIndex >= len(cluster.Shards) {

Callers 1

CreateMethod · 0.45

Calls 1

addNodeMethod · 0.80

Tested by

no test coverage detected