api

package
v0.0.0-...-d0f20ad Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2019 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MetricsService

type MetricsService struct {
	Now         func() clientmodel.Timestamp
	Storage     local.Storage
	QueryEngine *promql.Engine
}

MetricsService manages the /api HTTP endpoint.

func (MetricsService) Metrics

func (serv MetricsService) Metrics(w http.ResponseWriter, r *http.Request)

Metrics handles the /api/metrics endpoint.

func (MetricsService) Query

func (serv MetricsService) Query(w http.ResponseWriter, r *http.Request)

Query handles the /api/query endpoint.

func (MetricsService) QueryRange

func (serv MetricsService) QueryRange(w http.ResponseWriter, r *http.Request)

QueryRange handles the /api/query_range endpoint.

func (*MetricsService) RegisterHandler

func (msrv *MetricsService) RegisterHandler(pathPrefix string)

RegisterHandler registers the handler for the various endpoints below /api.

Jump to

Keyboard shortcuts

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