func StartServer(cli versioned.Interface, kubeCli kubernetes.Interface, port int) {
	svr := &server{discovery.NewPDDiscovery(cli, kubeCli)}

	ws := new(restful.WebService)
	ws.Route(ws.GET("/new/{advertise-peer-url}").To(svr.newHandler))
	restful.Add(ws)

	klog.Infof("starting PD Discovery server, listening on 0.0.0.0:%d", port)
	klog.Fatal(http.ListenAndServe(fmt.Sprintf(":%d", port), nil))
}
// StartServer starts a TiDB Discovery server
StartServer starts a TiDB Discovery server
// StartServer starts a TiDB Discovery server
func StartServer(cli versioned.Interface, kubeCli kubernetes.Interface, port int) {
	svr := &server{discovery.NewPDDiscovery(cli, kubeCli)}
	ws := new(restful.WebService)
	ws.Route(ws.GET("/new/{advertise-peer-url}").To(svr.newHandler))
	restful.Add(ws)
	klog.Infof("starting PD Discovery server, listening on 0.0.0.0:%d", port)
	klog.Fatal(http.ListenAndServe(fmt.Sprintf(":%d", port), nil))
}
func StartServer ( cli versioned . Interface , kubeCli kubernetes . Interface , port int ) { svr := & server { discovery . NewPDDiscovery ( cli , kubeCli ) } ws := new ( restful . WebService ) ws . Route ( ws . GET ( " " ) . To ( svr . newHandler ) ) restful . Add ( ws ) klog . Infof ( " " , port ) klog . Fatal ( http . ListenAndServe ( fmt . Sprintf ( " " , port ) , nil ) ) }
StartServer starts a TiDB Discovery server
StartServer starts a TiDB Discovery server