(shardIndex int, nodeID string)
| 125 | } |
| 126 | |
| 127 | func (cluster *Cluster) RemoveNode(shardIndex int, nodeID string) error { |
| 128 | if shardIndex < 0 || shardIndex >= len(cluster.Shards) { |
| 129 | return consts.ErrIndexOutOfRange |
| 130 | } |
| 131 | return cluster.Shards[shardIndex].removeNode(nodeID) |
| 132 | } |
| 133 | |
| 134 | func (cluster *Cluster) PromoteNewMaster(ctx context.Context, |
| 135 | shardIdx int, masterNodeID, preferredNodeID string, |