prometheus

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

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 New

func New(baseURL string) *Client

New builds a client for a Prometheus/VictoriaMetrics base URL.

func (*Client) Query

func (c *Client) Query(ctx context.Context, promql string, at time.Time) (providers.Samples, error)

Query runs an instant PromQL query (at = zero means "now").

func (*Client) QueryRange

func (c *Client) QueryRange(ctx context.Context, promql string, w providers.TimeWindow, step time.Duration) (providers.Matrix, error)

QueryRange runs a range PromQL query over a window.

Jump to

Keyboard shortcuts

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