gitlab.com/ignitionrobotics/web/ign-go@v1.0.0-rc4/monitoring/provider.go (about) 1 package monitoring 2 3 import ( 4 "github.com/urfave/negroni" 5 "net/http" 6 ) 7 8 // Provider is a piece of middleware that acts as a provider for a monitoring system. 9 // This includes setting up setting up a middleware to gather data and an endpoint on the server that the monitoring 10 // system can use to scrape data. 11 type Provider interface { 12 // MetricsRoute returns the route to the metrics endpoint. 13 MetricsRoute() string 14 // MetricsHandler returns an HTTP handler to use with the metrics endpoint. 15 MetricsHandler() http.Handler 16 // Middleware returns a middleware used to gather metrics from HTTP traffic. 17 Middleware(args ...interface{}) negroni.Handler 18 }