userExists is used for testing only to check the existence of a user.
(userId string)
| 98 | |
| 99 | // userExists is used for testing only to check the existence of a user. |
| 100 | func (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 | } |
no outgoing calls