Versions in this module Expand all Collapse all v0 v0.1.1 Dec 20, 2021 v0.1.0 Dec 15, 2021 Changes in this version + func AllPostingsKey() (name, value string) + func DefaultEngineOptions(timeout time.Duration, maxSamples int) promql.EngineOpts + func NewRangeStorage() *rangeStorage + func NewUnorderedmemPostings() *memPostings + func NewmemPostings() *memPostings + func PlainMarshal(value promql.Value) ([]byte, error) + func PromTimestamp(normalTime time.Time) int64 + func ToPlain(result *promql.Result) (*string, error) + func ToPrettyColoredJson(result *promql.Result) (*string, error) + func ToPrettyFormat(res *promql.Result, outputType string, colorized bool) (*string, error) + func ToPrettyJson(result *promql.Result) (*string, error) + func ToYaml(result *promql.Result) (*string, error) + type DataSource interface + ScrapePrometheusEndpoint func(ctx context.Context, nowish time.Time) ([]ParsedSeries, error) + type Indexer interface + GetMetricNames func() sets.String + GetStoredDimensionsForMetric func(string) sets.String + GetStoredValuesForMetricAndDimension func(string, string) sets.String + UpdateMetric func(m ParsedSeries) + func NewIndex() Indexer + type ParsedSeries struct + Labels labels.Labels + Timestamp int64 + Value float64 + func ParseTextData(data []byte, nowish time.Time) ([]ParsedSeries, error) + func ParseTextDataWithAdditionalLabels(data []byte, nowish time.Time, ls map[string]string) ([]ParsedSeries, error) + type PeriodicData struct + Callback ResultsCallback + Query string + Times Range + func NewPeriodicData(source DataSource, opts promql.EngineOpts) *PeriodicData + func (q *PeriodicData) GetIndex() Indexer + func (q *PeriodicData) ManuallyExecuteQuery(ctx context.Context, cb ResultsCallback) error + func (q *PeriodicData) Scrape(ctx context.Context) error + func (q *PeriodicData) SetQuery(ctx context.Context, query string) error + type Range struct + Instant bool + Interval time.Duration + Window time.Duration + type ResultsCallback func(*promql.Result) error