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

Method getLock

store/store.go:132–136  ·  view source on GitHub ↗
(ns, cluster string)

Source from the content-addressed store, hash-verified

130}
131
132func (s *ClusterStore) getLock(ns, cluster string) *sync.RWMutex {
133 value, _ := s.locks.LoadOrStore(fmt.Sprintf("%s/%s", ns, cluster), &sync.RWMutex{})
134 lock, _ := value.(*sync.RWMutex)
135 return lock
136}
137
138// ListCluster return the list of name of cluster under the specified namespace
139func (s *ClusterStore) ListCluster(ctx context.Context, ns string) ([]string, error) {

Callers 5

GetClusterMethod · 0.95
UpdateClusterMethod · 0.95
SetClusterMethod · 0.95
CreateClusterMethod · 0.95
RemoveClusterMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected