signals

package
v0.0.0-...-572177c Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2018 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PrometheusClient

type PrometheusClient interface {
	// Given a particular query (that's supposed to return range vectors
	// in Prometheus terminology), gets the results from Prometheus.
	GetTimeseries(query string) ([]Timeseries, error)
}

PrometheusClient talks to Prometheus using its HTTP API.

func NewPrometheusClient

func NewPrometheusClient(httpClient *http.Client, address string) PrometheusClient

NewPrometheusClient constructs a prometheusClient.

type Sample

type Sample struct {
	Value     float64
	Timestamp time.Time
}

Sample is a single timestamped value of the metric.

type Timeseries

type Timeseries struct {
	Labels  map[string]string
	Samples []Sample
}

Timeseries represents a metric with given labels, with its values possibly changing in time.

Jump to

Keyboard shortcuts

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