promql

package
v0.7.0 Latest Latest
Warning

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

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

Documentation

Overview

Package promql is an optional adapter that bridges the storage fetch contract (query/fetch) to the Prometheus storage.Queryable interface. It does not own a PromQL engine: the embedder (e.g. go-faster/oteldb, which already has PromQL/LogQL/TraceQL engines) drives its own promql.Engine over the Queryable this package returns. The storage library proper stops at the fetch seam and stays language- and Prometheus-free; this package is the only one importing github.com/prometheus/prometheus, and importing it is opt-in.

Condition extraction lives here (the language layer), never in storage: a Prometheus matcher that can match the empty string (e.g. `!=`, `!~`, `=""`) would wrongly exclude series that lack the label if pushed into the postings index, so only index-safe matchers are pushed down; every returned series is then re-checked against the full matcher set.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Queryable

type Queryable struct {
	// contains filtered or unexported fields
}

Queryable adapts a fetch.Fetcher (one tenant's engine) to the Prometheus storage.Queryable interface for a single tenant.

func NewQueryable

func NewQueryable(fetcher fetch.Fetcher, tenant signal.TenantID) *Queryable

NewQueryable returns a Prometheus storage.Queryable backed by fetcher for the given tenant.

func (*Queryable) Querier

func (q *Queryable) Querier(mint, maxt int64) (storage.Querier, error)

Querier returns a querier over [mint, maxt] (Prometheus milliseconds).

Jump to

Keyboard shortcuts

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