Versions in this module Expand all Collapse all v0 v0.54.2 Jan 28, 2025 Changes in this version + var AtModifierUnsafeFunctions = map[string]struct + var ErrValidationAtModifierDisabled = errors.New("@ modifier is disabled") + var ErrValidationNegativeOffsetDisabled = errors.New("negative offset is disabled") + var FunctionCalls = map[string]FunctionCall + func FindMinMaxTime(s *parser.EvalStmt) (int64, int64) + func NewHistogramStatsIterator(it chunkenc.Iterator) chunkenc.Iterator + func NewOriginContext(ctx context.Context, data map[string]interface{}) context.Context + func PreprocessExpr(expr parser.Expr, start, end time.Time) parser.Expr + type ActiveQueryTracker struct + func NewActiveQueryTracker(localStoragePath string, maxConcurrent int, logger log.Logger) *ActiveQueryTracker + func (tracker *ActiveQueryTracker) Close() error + func (tracker ActiveQueryTracker) Delete(insertIndex int) + func (tracker ActiveQueryTracker) GetMaxConcurrent() int + func (tracker ActiveQueryTracker) Insert(ctx context.Context, query string) (int, error) + type Engine struct + func NewEngine(opts EngineOpts) *Engine + func (ng *Engine) NewInstantQuery(ctx context.Context, q storage.Queryable, opts QueryOpts, qs string, ...) (Query, error) + func (ng *Engine) NewRangeQuery(ctx context.Context, q storage.Queryable, opts QueryOpts, qs string, ...) (Query, error) + func (ng *Engine) NewTestQuery(f func(context.Context) error) Query + func (ng *Engine) SetQueryLogger(l QueryLogger) + type EngineOpts struct + ActiveQueryTracker QueryTracker + EnableAtModifier bool + EnableNegativeOffset bool + EnablePerStepStats bool + Logger log.Logger + LookbackDelta time.Duration + MaxSamples int + NoStepSubqueryIntervalFn func(rangeMillis int64) int64 + Reg prometheus.Registerer + Timeout time.Duration + type Entry struct + Query string + Timestamp int64 + type ErrQueryCanceled string + func (e ErrQueryCanceled) Error() string + type ErrQueryTimeout string + func (e ErrQueryTimeout) Error() string + type ErrStorage struct + Err error + func (e ErrStorage) Error() string + type ErrTooManySamples string + func (e ErrTooManySamples) Error() string + type EvalNodeHelper struct + Out Vector + Ts int64 + type EvalSeriesHelper struct + type FPoint struct + F float64 + T int64 + func (p FPoint) MarshalJSON() ([]byte, error) + func (p FPoint) String() string + type FunctionCall func(vals []parser.Value, args parser.Expressions, enh *EvalNodeHelper) (Vector, annotations.Annotations) + type HPoint struct + H *histogram.FloatHistogram + T int64 + func (p HPoint) MarshalJSON() ([]byte, error) + func (p HPoint) String() string + type HashRatioSampler struct + func NewHashRatioSampler() *HashRatioSampler + func (s *HashRatioSampler) AddRatioSample(ratioLimit float64, sample *Sample) bool + type Matrix []Series + func (Matrix) Type() parser.ValueType + func (m Matrix) ContainsSameLabelset() bool + func (m Matrix) Len() int + func (m Matrix) Less(i, j int) bool + func (m Matrix) String() string + func (m Matrix) Swap(i, j int) + func (m Matrix) TotalSamples() int + type PrometheusQueryOpts struct + func (p *PrometheusQueryOpts) EnablePerStepStats() bool + func (p *PrometheusQueryOpts) LookbackDelta() time.Duration + type Query interface + Cancel func() + Close func() + Exec func(ctx context.Context) *Result + Statement func() parser.Statement + Stats func() *stats.Statistics + String func() string + type QueryEngine interface + NewInstantQuery func(ctx context.Context, q storage.Queryable, opts QueryOpts, qs string, ...) (Query, error) + NewRangeQuery func(ctx context.Context, q storage.Queryable, opts QueryOpts, qs string, ...) (Query, error) + type QueryLogger interface + Close func() error + Log func(...interface{}) error + type QueryOpts interface + EnablePerStepStats func() bool + LookbackDelta func() time.Duration + func NewPrometheusQueryOpts(enablePerStepStats bool, lookbackDelta time.Duration) QueryOpts + type QueryOrigin struct + type QueryTracker interface + Delete func(insertIndex int) + GetMaxConcurrent func() int + Insert func(ctx context.Context, query string) (int, error) + type RatioSampler interface + AddRatioSample func(r float64, sample *Sample) bool + type Result struct + Err error + Value parser.Value + Warnings annotations.Annotations + func (r *Result) Matrix() (Matrix, error) + func (r *Result) Scalar() (Scalar, error) + func (r *Result) String() string + func (r *Result) Vector() (Vector, error) + type Sample struct + F float64 + H *histogram.FloatHistogram + Metric labels.Labels + T int64 + func (s Sample) MarshalJSON() ([]byte, error) + func (s Sample) String() string + type Scalar struct + T int64 + V float64 + func (Scalar) Type() parser.ValueType + func (s Scalar) MarshalJSON() ([]byte, error) + func (s Scalar) String() string + type Series struct + Floats []FPoint + Histograms []HPoint + Metric labels.Labels + func (s Series) String() string + type StorageSeries struct + func NewStorageSeries(series Series) *StorageSeries + func (ss *StorageSeries) Iterator(it chunkenc.Iterator) chunkenc.Iterator + func (ss *StorageSeries) Labels() labels.Labels + type String struct + T int64 + V string + func (String) Type() parser.ValueType + func (s String) MarshalJSON() ([]byte, error) + func (s String) String() string + type Vector []Sample + func (Vector) Type() parser.ValueType + func (vec Vector) ContainsSameLabelset() bool + func (vec Vector) String() string + func (vec Vector) TotalSamples() int v0.54.1-promotel-v1.0.0 Jan 28, 2025