func (c *checkerHandler) PauseOrResume(w http.ResponseWriter, r *http.Request) {
	var input map[string]int
	if err := apiutil.ReadJSONRespondError(c.r, w, r.Body, &input); err != nil {
		return
	}
	name := mux.Vars(r)["name"]
	t, ok := input["delay"]
	if !ok {
		c.r.JSON(w, http.StatusBadRequest, "missing pause time")
		return
	}
	if t < 0 {
		c.r.JSON(w, http.StatusBadRequest, "delay cannot be negative")
		return
	}
	if err := c.PauseOrResumeChecker(name, int64(t)); err != nil {
		c.r.JSON(w, http.StatusInternalServerError, err.Error())
		return
	}
	if t == 0 {
		c.r.JSON(w, http.StatusOK, "Resume the checker successfully.")
	} else {
		c.r.JSON(w, http.StatusOK, "Pause the checker successfully.")
	}
}
FIXME: details of input json body params
@Tags checker
@Summary Pause or resume region merge.
@Accept json
@Param name path string true "The name of the checker."
@Param body body object true "json params"
@Produce json
@Success 200 {string} string "Pause or resume the scheduler successfully."
@Failure 400 {string} string "Bad format request."
@Failure 500 {string} string "PD server failed to proceed the request."
@Router /checker/{name} [post]
package api
import (
	"net/http"
	"github.com/gorilla/mux"
	"github.com/tikv/pd/pkg/apiutil"
	"github.com/tikv/pd/server"
	"github.com/unrolled/render"
)
type checkerHandler struct {
	*server.Handler
	r *render.Render
}
func newCheckerHandler(svr *server.Server, r *render.Render) *checkerHandler {
	return &checkerHandler{
		Handler: svr.GetHandler(),
		r:       r,
	}
}