Documentation ¶
Index ¶
- Constants
- func Delete(ms storage.MetricStore, jobBase64Encoded bool, logger log.Logger) func(http.ResponseWriter, *http.Request, httprouter.Params)
- func Healthy(ms storage.MetricStore) http.Handler
- func Push(ms storage.MetricStore, replace bool, jobBase64Encoded bool, logger log.Logger) func(http.ResponseWriter, *http.Request, httprouter.Params)
- func Ready(ms storage.MetricStore) http.Handler
- func Static(root http.FileSystem, prefix string) http.Handler
- func Status(ms storage.MetricStore, root http.FileSystem, flags map[string]string, ...) http.Handler
Constants ¶
const ( // Base64Suffix is appended to a label name in the request URL path to // mark the following label value as base64 encoded. Base64Suffix = "@base64" )
Variables ¶
This section is empty.
Functions ¶
func Delete ¶
func Delete(ms storage.MetricStore, jobBase64Encoded bool, logger log.Logger) 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 Push ¶
func Push( ms storage.MetricStore, replace bool, jobBase64Encoded bool, logger log.Logger, ) 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.
Types ¶
This section is empty.