UserStatsHandler handles user stats to the Distributor.
(w http.ResponseWriter, r *http.Request)
| 8 | |
| 9 | // UserStatsHandler handles user stats to the Distributor. |
| 10 | func (d *Distributor) UserStatsHandler(w http.ResponseWriter, r *http.Request) { |
| 11 | stats, err := d.UserStats(r.Context()) |
| 12 | if err != nil { |
| 13 | http.Error(w, err.Error(), http.StatusInternalServerError) |
| 14 | return |
| 15 | } |
| 16 | |
| 17 | util.WriteJSONResponse(w, stats) |
| 18 | } |
nothing calls this directly
no test coverage detected