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 ¶
NewQueryable returns a Prometheus storage.Queryable backed by fetcher for the given tenant.