Method
ServeHTTP
(writer http.ResponseWriter, request *http.Request)
Source from the content-addressed store, hash-verified
| 25 | } |
| 26 | |
| 27 | func (h *metricsHandler) ServeHTTP(writer http.ResponseWriter, request *http.Request) { |
| 28 | if h.path != request.URL.Path { |
| 29 | writer.WriteHeader(404) |
| 30 | return |
| 31 | } |
| 32 | writer.Header().Set("Content-Type", "application/openmetrics-text; version=1.0.0; charset=utf-8") |
| 33 | writer.WriteHeader(200) |
| 34 | _, _ = writer.Write([]byte(h.collector.String())) |
| 35 | } |
Callers
nothing calls this directly
Tested by
no test coverage detected