Documentation
¶
Overview ¶
Package prometheus implements providers.MetricsProvider against the Prometheus HTTP API — also spoken by VictoriaMetrics — for instant and range PromQL queries.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client queries a Prometheus-compatible metrics backend.
func NewWithAuth ¶ added in v0.3.0
NewWithAuth builds a client that adds optional auth to every request. tokenEnv names an env var holding a bearer token (empty, or pointing at an unset/empty var, ⇒ no Authorization header); headers are static request headers (e.g. "X-Scope-OrgID" for a multi-tenant backend). The token is read from the environment at request-build time and is never logged.
Click to show internal directories.
Click to hide internal directories.