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

Method updatePrimaryStoreGauge

pkg/ring/kv/multi.go:207–218  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

205}
206
207func (m *MultiClient) updatePrimaryStoreGauge() {
208 _, pkv := m.getPrimaryClient()
209
210 for _, kv := range m.clients {
211 value := float64(0)
212 if pkv == kv {
213 value = 1
214 }
215
216 m.primaryStoreGauge.WithLabelValues(kv.name).Set(value)
217 }
218}
219
220func (m *MultiClient) updateMirrorEnabledGauge() {
221 if m.mirroringEnabled.Load() {

Callers 2

NewMultiClientFunction · 0.95
setNewPrimaryClientMethod · 0.95

Calls 2

getPrimaryClientMethod · 0.95
SetMethod · 0.65

Tested by

no test coverage detected