func()

in plugin/metrics.go [68:80]


func (m *Metrics) Serve() chan error {
	errorChan := make(chan error)
	mux := http.NewServeMux()
	mux.Handle(fmt.Sprintf("/%s", m.ServingURL.EscapedPath()), promhttp.Handler())

	go func() {
		defer close(errorChan)
		glog.Infof("Registering Metrics listener on port %s", m.ServingURL.Port())
		errorChan <- http.ListenAndServe(m.ServingURL.Host, mux)
	}()

	return errorChan
}