(w http.ResponseWriter, req *http.Request)
| 45 | } |
| 46 | |
| 47 | func (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 | |
| 58 | func (h *PartitionRingPageHandler) handleGetRequest(w http.ResponseWriter, req *http.Request) { |
| 59 | var ( |