Versions in this module Expand all Collapse all v2 v2.30.1 Jul 6, 2021 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 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) 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(q storage.Queryable, qs string, ts time.Time) (Query, error) + func (ng *Engine) NewRangeQuery(q storage.Queryable, qs string, start, end time.Time, interval time.Duration) (Query, error) + func (ng *Engine) SetQueryLogger(l QueryLogger) + type EngineOpts struct + ActiveQueryTracker *ActiveQueryTracker + EnableAtModifier bool + EnableNegativeOffset 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 + Dmn map[uint64]labels.Labels + Out Vector + Ts int64 + func (enh *EvalNodeHelper) DropMetricName(l labels.Labels) labels.Labels + type EvalSeriesHelper struct + type FunctionCall func(vals []parser.Value, args parser.Expressions, enh *EvalNodeHelper) Vector + type LazyLoader struct + SubqueryInterval time.Duration + func NewLazyLoader(t testutil.T, input string, opts LazyLoaderOpts) (*LazyLoader, error) + func (ll *LazyLoader) Close() + func (ll *LazyLoader) Context() context.Context + func (ll *LazyLoader) QueryEngine() *Engine + func (ll *LazyLoader) Queryable() storage.Queryable + func (ll *LazyLoader) Storage() storage.Storage + func (ll *LazyLoader) WithSamplesTill(ts time.Time, fn func(error)) + type LazyLoaderOpts struct + EnableAtModifier bool + EnableNegativeOffset 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 Point struct + T int64 + V float64 + func (p Point) MarshalJSON() ([]byte, error) + func (p Point) String() string + type Query interface + Cancel func() + Close func() + Exec func(ctx context.Context) *Result + Statement func() parser.Statement + Stats func() *stats.QueryTimers + type QueryLogger interface + Close func() error + Log func(...interface{}) error + type QueryOrigin struct + type Result struct + Err error + Value parser.Value + Warnings storage.Warnings + 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 + Metric labels.Labels + 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 + Metric labels.Labels + Points []Point + func (s Series) String() string + type StorageSeries struct + func NewStorageSeries(series Series) *StorageSeries + func (ss *StorageSeries) 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 Test struct + func NewTest(t testutil.T, input string) (*Test, error) + func (t *Test) Close() + func (t *Test) Context() context.Context + func (t *Test) ExemplarQueryable() storage.ExemplarQueryable + func (t *Test) ExemplarStorage() storage.ExemplarStorage + func (t *Test) QueryEngine() *Engine + func (t *Test) Queryable() storage.Queryable + func (t *Test) Run() error + func (t *Test) Storage() storage.Storage + func (t *Test) TSDB() *tsdb.DB + type Vector []Sample + func (Vector) Type() parser.ValueType + func (vec Vector) ContainsSameLabelset() bool + func (vec Vector) String() string Other modules containing this package github.com/wangjc0216/prometheus