(w http.ResponseWriter, req *http.Request)
| 37 | } |
| 38 | |
| 39 | func (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 | } |
nothing calls this directly
no test coverage detected