api

package
v0.0.0-...-f2052c9 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2014 License: Apache-2.0 Imports: 18 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 {
	Config        *config.Config
	TargetManager retrieval.TargetManager
	Storage       local.Storage
	// contains filtered or unexported fields
}

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()

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

func (MetricsService) SetTargets

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

SetTargets handles the /api/targets endpoint.

type TargetGroup

type TargetGroup struct {
	Endpoints  []string          `json:"endpoints"`
	BaseLabels map[string]string `json:"baseLabels"`
}

TargetGroup bundles endpoints and base labels with appropriate JSON annotations.

Notes

Bugs

  • Use Content-Type negotiation.

  • Validate that this ScrapeInterval is in fact the proper one for the job.

Jump to

Keyboard shortcuts

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