func (h *memberHandler) ListMembers(w http.ResponseWriter, r *http.Request) {
	members, err := getMembers(h.svr)
	if err != nil {
		h.rd.JSON(w, http.StatusInternalServerError, err.Error())
		return
	}
	h.rd.JSON(w, http.StatusOK, members)
}
@Tags member
@Summary List all PD servers in the cluster.
@Produce json
@Success 200 {object} pdpb.GetMembersResponse
@Failure 500 {string} string "PD server failed to proceed the request."
@Router /members [get]
package api
import (
	"context"
	"fmt"
	"net/http"
	"strconv"
	"github.com/gorilla/mux"
	"github.com/pingcap/errors"
	"github.com/pingcap/kvproto/pkg/pdpb"
	"github.com/pingcap/log"
	"github.com/tikv/pd/pkg/apiutil"
	"github.com/tikv/pd/pkg/errs"
	"github.com/tikv/pd/pkg/etcdutil"
	"github.com/tikv/pd/server"
	"github.com/unrolled/render"
	"go.uber.org/zap"
)
type memberHandler struct {
	svr *server.Server
	rd  *render.Render
}
func newMemberHandler(svr *server.Server, rd *render.Render) *memberHandler {
	return &memberHandler{
		svr: svr,
		rd:  rd,
	}
}