handler

package
v0.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 17, 2018 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Delete

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

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL