func (s *ProxyServer) Run() error {
	if s.Config.Port > 0 {
		go func() {
			mux := http.NewServeMux()
			healthz.InstallHandler(mux)
			if s.Config.EnableProfiling {
				mux.HandleFunc("/debug/pprof/", pprof.Index)
				mux.HandleFunc("/debug/pprof/profile", pprof.Profile)
				mux.HandleFunc("/debug/pprof/symbol", pprof.Symbol)
			}
			mux.Handle("/metrics", prometheus.Handler())

			server := &http.Server{
				Addr:    net.JoinHostPort(s.Config.Address, strconv.Itoa(s.Config.Port)),
				Handler: mux,
			}
			glog.Fatal(server.ListenAndServe())
		}()
	}

	s.Controller.Run(wait.NeverStop, registerOSSignals())
	return nil
}
// Run runs the specified ProxyServer. This should never exit.
Run runs the specified ProxyServer. This should never exit.
// Run runs the specified ProxyServer . This should never exit .
func (s *ProxyServer) Run() error {
	if s.Config.Port > 0 {
		go func() {
			mux := http.NewServeMux()
			healthz.InstallHandler(mux)
			if s.Config.EnableProfiling {
				mux.HandleFunc("/debug/pprof/", pprof.Index)
				mux.HandleFunc("/debug/pprof/profile", pprof.Profile)
				mux.HandleFunc("/debug/pprof/symbol", pprof.Symbol)
			}
			mux.Handle("/metrics", prometheus.Handler())
			server := &http.Server{
				Addr:    net.JoinHostPort(s.Config.Address, strconv.Itoa(s.Config.Port)),
				Handler: mux,
			}
			glog.Fatal(server.ListenAndServe())
		}()
	}
	s.Controller.Run(wait.NeverStop, registerOSSignals())
	return nil
}
func ( s * ProxyServer ) Run ( ) error { if s . Config . Port > 0 { go func ( ) { mux := http . NewServeMux ( ) healthz . InstallHandler ( mux ) if s . Config . EnableProfiling { mux . HandleFunc ( " " , pprof . Index ) mux . HandleFunc ( " " , pprof . Profile ) mux . HandleFunc ( " " , pprof . Symbol ) } mux . Handle ( " " , prometheus . Handler ( ) ) server := & http . Server { Addr : net . JoinHostPort ( s . Config . Address , strconv . Itoa ( s . Config . Port ) ) , Handler : mux , } glog . Fatal ( server . ListenAndServe ( ) ) } ( ) } s . Controller . Run ( wait . NeverStop , registerOSSignals ( ) ) return nil }
Run runs the specified ProxyServer.
Run runs the specified ProxyServer .