Documentation ¶
Index ¶
- Constants
- func Delete(ms storage.MetricStore, jobBase64Encoded bool, logger log.Logger) func(http.ResponseWriter, *http.Request)
- func Healthy(ms storage.MetricStore) http.Handler
- func InstrumentWithCounter(handlerName string, handler http.Handler) http.HandlerFunc
- func Push(ms storage.MetricStore, replace, check, jobBase64Encoded bool, ...) func(http.ResponseWriter, *http.Request)
- 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
- func WipeMetricStore(ms storage.MetricStore, logger log.Logger) 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)
Delete returns a handler that accepts delete requests.
The returned handler is already instrumented for Prometheus.
func Healthy ¶
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 InstrumentWithCounter ¶
func InstrumentWithCounter(handlerName string, handler http.Handler) http.HandlerFunc
func Push ¶
func Push( ms storage.MetricStore, replace, check, jobBase64Encoded bool, logger log.Logger, ) func(http.ResponseWriter, *http.Request)
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. If check is true, the pushed metrics are immediately checked for consistency (with existing metrics and themselves), and an inconsistent push is rejected with http.StatusBadRequest.
The returned handler is already instrumented for Prometheus.
func Ready ¶
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 ¶
func Static(root http.FileSystem, prefix string) 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, pathPrefix string, logger log.Logger, ) http.Handler
Status serves the status page.
The returned handler is already instrumented for Prometheus.
func WipeMetricStore ¶
WipeMetricStore deletes all the metrics in MetricStore.
The returned handler is already instrumented for Prometheus.
Types ¶
This section is empty.