MCPcopy Index your code
hub / github.com/cortexproject/cortex / RingHandler

Method RingHandler

pkg/compactor/compactor_http.go:39–53  ·  view source on GitHub ↗
(w http.ResponseWriter, req *http.Request)

Source from the content-addressed store, hash-verified

37}
38
39func (c *Compactor) RingHandler(w http.ResponseWriter, req *http.Request) {
40 if !c.compactorCfg.ShardingEnabled {
41 writeMessage(w, "Compactor has no ring because sharding is disabled.")
42 return
43 }
44
45 if c.State() != services.Running {
46 // we cannot read the ring before Compactor is in Running state,
47 // because that would lead to race condition.
48 writeMessage(w, "Compactor is not running yet.")
49 return
50 }
51
52 c.ring.ServeHTTP(w, req)
53}

Callers

nothing calls this directly

Calls 3

writeMessageFunction · 0.70
StateMethod · 0.65
ServeHTTPMethod · 0.45

Tested by

no test coverage detected