Documentation ¶
Index ¶
- func Delete(ms storage.MetricStore) func(http.ResponseWriter, *http.Request, httprouter.Params)
- func Healthy(ms storage.MetricStore) http.Handler
- func LegacyDelete(ms storage.MetricStore) func(http.ResponseWriter, *http.Request, httprouter.Params)
- func LegacyPush(ms storage.MetricStore, replace bool) func(http.ResponseWriter, *http.Request, httprouter.Params)
- func Push(ms storage.MetricStore, replace bool) func(http.ResponseWriter, *http.Request, httprouter.Params)
- func Ready(ms storage.MetricStore) http.Handler
- func Static(root http.FileSystem) http.Handler
- func Status(ms storage.MetricStore, root http.FileSystem, flags map[string]string) http.Handler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Delete ¶
func Delete(ms storage.MetricStore) func(http.ResponseWriter, *http.Request, httprouter.Params)
Delete returns a handler that accepts delete requests.
The returned handler is already instrumented for Prometheus.
func Healthy ¶ added in v0.5.0
func Healthy(ms storage.MetricStore) http.Handler
Healthy is used to report the health of the Pushgateway. It currently only uses the Healthy method of the MetricScore to detect healthy state.
The returned handler is already instrumented for Prometheus.
func LegacyDelete ¶
func LegacyDelete(ms storage.MetricStore) func(http.ResponseWriter, *http.Request, httprouter.Params)
LegacyDelete returns a handler that accepts delete requests. It deals with the deprecated API.
The returned handler is already instrumented for Prometheus.
func LegacyPush ¶
func LegacyPush( ms storage.MetricStore, replace bool, ) func(http.ResponseWriter, *http.Request, httprouter.Params)
LegacyPush returns an http.Handler which accepts samples over HTTP and stores them in the MetricStore. It uses the deprecated API (expecting a 'job' parameter and an optional 'instance' parameter). If replace is true, all metrics for the job and instance given by the request are deleted before new ones are stored.
The returned handler is already instrumented for Prometheus.
func Push ¶
func Push( ms storage.MetricStore, replace bool, ) func(http.ResponseWriter, *http.Request, httprouter.Params)
Push returns an http.Handler which accepts samples over HTTP and stores them in the MetricStore. If replace is true, all metrics for the job and instance given by the request are deleted before new ones are stored.
The returned handler is already instrumented for Prometheus.
func Ready ¶ added in v0.5.0
func Ready(ms storage.MetricStore) http.Handler
Ready is used to report if the Pushgateway is ready to process requests. It currently only uses the Ready method of the MetricScore to detect ready state.
The returned handler is already instrumented for Prometheus.
func Static ¶ added in v0.6.0
func Static(root http.FileSystem) http.Handler
Static serves the static files from the provided http.FileSystem.
The returned handler is already instrumented for Prometheus.
func Status ¶
func Status( ms storage.MetricStore, root http.FileSystem, flags map[string]string, ) http.Handler
Status serves the status page.
The returned handler is already instrumented for Prometheus.
Types ¶
This section is empty.