(w http.ResponseWriter, r *http.Request)
| 39 | } |
| 40 | |
| 41 | func (h *readyHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { |
| 42 | ready, err := h.handle(w, r) |
| 43 | if err != nil { |
| 44 | http.Error(w, err.Error(), http.StatusBadRequest) |
| 45 | } else { |
| 46 | fmt.Fprintf(w, "%v", ready) |
| 47 | } |
| 48 | } |
| 49 | |
| 50 | func (h *readyHandler) handle(w http.ResponseWriter, r *http.Request) (bool, error) { |
| 51 | // Parse args. |