func (h *regionLabelHandler) GetAllRules(w http.ResponseWriter, r *http.Request) {
	cluster := getCluster(r)
	rules := cluster.GetRegionLabeler().GetAllLabelRules()
	h.rd.JSON(w, http.StatusOK, rules)
}
@Tags region_label
@Summary List all label rules of cluster.
@Produce json
@Success 200 {array} labeler.LabelRule
@Router /config/region-label/rules [get]
package api
import (
	"net/http"
	"net/url"
	"strconv"
	"github.com/gorilla/mux"
	"github.com/tikv/pd/pkg/apiutil"
	"github.com/tikv/pd/pkg/errs"
	"github.com/tikv/pd/server"
	"github.com/tikv/pd/server/schedule/labeler"
	"github.com/unrolled/render"
)
type regionLabelHandler struct {
	svr *server.Server
	rd  *render.Render
}
func newRegionLabelHandler(s *server.Server, rd *render.Render) *regionLabelHandler {
	return &regionLabelHandler{
		svr: s,
		rd:  rd,
	}
}