Documentation
¶
Index ¶
- type ProxyChunkQuerier
- type ProxyQuerier
- func (h *ProxyQuerier) Close() error
- func (h *ProxyQuerier) LabelNames(ctx context.Context, _ *storage.LabelHints, matchers ...*labels.Matcher) ([]string, annotations.Annotations, error)
- func (h *ProxyQuerier) LabelValues(ctx context.Context, name string, _ *storage.LabelHints, ...) ([]string, annotations.Annotations, error)
- func (h *ProxyQuerier) Select(ctx context.Context, _ bool, hints *storage.SelectHints, ...) storage.SeriesSet
- type SeriesSet
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.
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) 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.