func NewServer( addr string, grafanaAddr string, grafanaExternalAddr string, grafanaPrefix string, jaegerAddr string, templateDir string, staticDir string, uuid string, version string, controllerNamespace string, clusterDomain string, reload bool, reHost *regexp.Regexp, apiClient vizPb.ApiClient, k8sAPI *k8s.KubernetesAPI, hc healthChecker, ) *http.Server
NewServer returns an initialized `http.Server`, configured to listen on an address, render templates, and serve static assets, for a given Linkerd control plane.
Server encapsulates the Linkerd control plane's web dashboard server.
type Server struct {
// contains filtered or unexported fields
}
func FakeServer() Server
FakeServer provides a mock of a Server in `/web/srv`.
func (s *Server) RenderTemplate(w http.ResponseWriter, templateFile, templateName string, args interface{}) error
RenderTemplate writes a rendered template into a buffer, given an HTTP request and template information.
func (s *Server) ServeHTTP(w http.ResponseWriter, req *http.Request)
this is called by the HTTP server to actually respond to a request