MCPcopy Create free account
hub / github.com/cortexproject/cortex / userExists

Method userExists

pkg/util/labelset/tracker.go:100–111  ·  view source on GitHub ↗

userExists is used for testing only to check the existence of a user.

(userId string)

Source from the content-addressed store, hash-verified

98
99// userExists is used for testing only to check the existence of a user.
100func (m *LabelSetTracker) userExists(userId string) bool {
101 for i := range numMetricShards {
102 shard := m.shards[i]
103 shard.RLock()
104 defer shard.RUnlock()
105 _, ok := shard.userLabelSets[userId]
106 if ok {
107 return true
108 }
109 }
110 return false
111}

Callers 1

TestLabelSetTrackerFunction · 0.95

Calls

no outgoing calls

Tested by 1

TestLabelSetTrackerFunction · 0.76