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

Method getCluster

controller/controller.go:200–210  ·  view source on GitHub ↗
(namespace, clusterName string)

Source from the content-addressed store, hash-verified

198}
199
200func (c *Controller) getCluster(namespace, clusterName string) (*ClusterChecker, error) {
201 key := c.buildClusterKey(namespace, clusterName)
202
203 c.mu.Lock()
204 defer c.mu.Unlock()
205 cluster, ok := c.clusters[key]
206 if !ok {
207 return nil, consts.ErrNotFound
208 }
209 return cluster, nil
210}
211
212func (c *Controller) removeCluster(namespace, clusterName string) {
213 key := c.buildClusterKey(namespace, clusterName)

Callers 2

addClusterMethod · 0.95
TestController_BasicsFunction · 0.80

Calls 1

buildClusterKeyMethod · 0.95

Tested by 1

TestController_BasicsFunction · 0.64