MCPcopy
hub / github.com/grafana/dskit / ServeHTTP

Method ServeHTTP

ring/partition_ring_http.go:47–56  ·  view source on GitHub ↗
(w http.ResponseWriter, req *http.Request)

Source from the content-addressed store, hash-verified

45}
46
47func (h *PartitionRingPageHandler) ServeHTTP(w http.ResponseWriter, req *http.Request) {
48 switch req.Method {
49 case http.MethodGet:
50 h.handleGetRequest(w, req)
51 case http.MethodPost:
52 h.handlePostRequest(w, req)
53 default:
54 http.Error(w, "Unsupported HTTP method", http.StatusMethodNotAllowed)
55 }
56}
57
58func (h *PartitionRingPageHandler) handleGetRequest(w http.ResponseWriter, req *http.Request) {
59 var (

Calls 3

handleGetRequestMethod · 0.95
handlePostRequestMethod · 0.95
ErrorMethod · 0.45