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

Method getLock

server/api/cluster.go:54–58  ·  view source on GitHub ↗
(ns, cluster string)

Source from the content-addressed store, hash-verified

52}
53
54func (handler *ClusterHandler) getLock(ns, cluster string) *sync.RWMutex {
55 value, _ := handler.locks.LoadOrStore(fmt.Sprintf("%s/%s", ns, cluster), &sync.RWMutex{})
56 lock, _ := value.(*sync.RWMutex)
57 return lock
58}
59
60func (handler *ClusterHandler) List(c *gin.Context) {
61 namespace := c.Param("namespace")

Callers 1

MigrateSlotMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected