proxyquerier

package
v0.0.96 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2026 License: MIT Imports: 11 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ProxyChunkQuerier added in v0.0.96

type ProxyChunkQuerier struct {
	*ProxyQuerier
}

ProxyChunkQuerier implements prometheus' storage.ChunkQuerier on top of ProxyQuerier. Promxy has no native chunk source -- it fetches raw samples from the downstream server groups -- so Select runs the normal sample-based ProxyQuerier.Select and re-encodes the resulting series into chunks via storage.NewSeriesSetToChunkSet.

This is what backs promxy's own remote_read endpoint (/api/v1/read) for the STREAMED_XOR_CHUNKS response type, which is what a stock Prometheus remote_read client negotiates by default. Without it that path returned a 500 ("not implemented"). The label-querier methods (LabelValues, LabelNames, Close) are promoted from the embedded *ProxyQuerier.

func (*ProxyChunkQuerier) Select added in v0.0.96

func (h *ProxyChunkQuerier) Select(ctx context.Context, sortSeries bool, hints *storage.SelectHints, matchers ...*labels.Matcher) storage.ChunkSeriesSet

Select fetches the matching series as samples and re-encodes them as chunks. The remote-read streaming API requires series to be sorted by label set, so the result is always sorted here (ProxyQuerier.Select does not guarantee an order); the sortSeries hint is therefore honored unconditionally.

type ProxyQuerier

type ProxyQuerier struct {
	Start  time.Time
	End    time.Time
	Client promclient.API

	Cfg *proxyconfig.PromxyConfig
}

ProxyQuerier Implements prometheus' Querier interface

func (*ProxyQuerier) Close

func (h *ProxyQuerier) Close() error

Close closes the querier. Behavior for subsequent calls to Querier methods is undefined.

func (*ProxyQuerier) LabelNames

func (h *ProxyQuerier) LabelNames(ctx context.Context, _ *storage.LabelHints, matchers ...*labels.Matcher) ([]string, annotations.Annotations, error)

LabelNames returns all the unique label names present in the block in sorted order.

func (*ProxyQuerier) LabelValues

func (h *ProxyQuerier) LabelValues(ctx context.Context, name string, _ *storage.LabelHints, matchers ...*labels.Matcher) ([]string, annotations.Annotations, error)

LabelValues returns all potential values for a label name.

func (*ProxyQuerier) Select

func (h *ProxyQuerier) Select(ctx context.Context, _ bool, hints *storage.SelectHints, matchers ...*labels.Matcher) storage.SeriesSet

Select returns a set of series that matches the given label matchers. TODO: switch based on sortSeries bool(first arg)

type SeriesSet

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

SeriesSet implements prometheus' SeriesSet interface

func NewSeriesSet

func NewSeriesSet(series []storage.Series, warnings annotations.Annotations, err error) *SeriesSet

NewSeriesSet returns a SeriesSet for the given series

func (*SeriesSet) At

func (s *SeriesSet) At() storage.Series

At returns the current Series for this iterator

func (*SeriesSet) Err

func (s *SeriesSet) Err() error

Err returns any error found in this iterator

func (*SeriesSet) Next

func (s *SeriesSet) Next() bool

Next will attempt to move the iterator up

func (*SeriesSet) Warnings added in v0.0.63

func (s *SeriesSet) Warnings() annotations.Annotations

Warnings returns a collection of warnings for the whole set. Note: Warnings could be returned even if iteration has not failed with an error.

Jump to

Keyboard shortcuts

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