HasInstance returns whether the ring contains an instance matching the provided instanceID.
(instanceID string)
| 1285 | |
| 1286 | // HasInstance returns whether the ring contains an instance matching the provided instanceID. |
| 1287 | func (r *Ring) HasInstance(instanceID string) bool { |
| 1288 | r.mtx.RLock() |
| 1289 | defer r.mtx.RUnlock() |
| 1290 | |
| 1291 | instances := r.ringDesc.GetIngesters() |
| 1292 | _, ok := instances[instanceID] |
| 1293 | return ok |
| 1294 | } |
| 1295 | |
| 1296 | func (r *Ring) getCachedShuffledSubring(identifier string, size int) *Ring { |
| 1297 | if r.cfg.SubringCacheDisabled { |
nothing calls this directly
no test coverage detected