Documentation ¶
Overview ¶
Package metrics represents the reader and writer interface to remote write to and query from Prometheus for a set of labels.
Index ¶
- func Generate(labels []prompb.Label) *prompb.WriteRequest
- func Query(ctx context.Context, l log.Logger, endpoint *url.URL, t auth.TokenProvider, ...) (int, promapiv1.Warnings, error)
- func Read(ctx context.Context, endpoint *url.URL, tp auth.TokenProvider, ...) (int, error)
- func Write(ctx context.Context, endpoint *url.URL, t auth.TokenProvider, ...) (int, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Generate ¶
func Generate(labels []prompb.Label) *prompb.WriteRequest
Generate takes a set of labels and metrics key-value pairs and returns the payload to write metrics to Prometheus.
func Query ¶
func Query( ctx context.Context, l log.Logger, endpoint *url.URL, t auth.TokenProvider, query options.Query, tls options.TLS, defaultStep time.Duration, ) (int, promapiv1.Warnings, error)
Query executes a query specification, a set of queries, against Prometheus.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.