(shardIndex int)
| 111 | } |
| 112 | |
| 113 | func (cluster *Cluster) GetShard(shardIndex int) (*Shard, error) { |
| 114 | if shardIndex < 0 || shardIndex >= len(cluster.Shards) { |
| 115 | return nil, consts.ErrIndexOutOfRange |
| 116 | } |
| 117 | return cluster.Shards[shardIndex], nil |
| 118 | } |
| 119 | |
| 120 | func (cluster *Cluster) AddNode(shardIndex int, addr, role, password string) (*ClusterNode, error) { |
| 121 | if shardIndex < 0 || shardIndex >= len(cluster.Shards) { |
no outgoing calls
no test coverage detected