handler

package
v0.4.0-1 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2018 License: Apache-2.0 Imports: 24 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 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 Status

func Status(
	ms storage.MetricStore,
	assetFunc func(string) ([]byte, error),
	flags map[string]string,
) func(http.ResponseWriter, *http.Request)

Status serves the status page.

Types

This section is empty.

Jump to

Keyboard shortcuts

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