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

Method GetShard

store/cluster.go:113–118  ·  view source on GitHub ↗
(shardIndex int)

Source from the content-addressed store, hash-verified

111}
112
113func (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
120func (cluster *Cluster) AddNode(shardIndex int, addr, role, password string) (*ClusterNode, error) {
121 if shardIndex < 0 || shardIndex >= len(cluster.Shards) {

Callers 2

PromoteNewMasterMethod · 0.95
RequiredClusterShardFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected