MCPcopy
hub / github.com/prometheus/prometheus / NewInstantQuery

Method NewInstantQuery

promql/engine.go:127–127  ·  view source on GitHub ↗
(ctx context.Context, q storage.Queryable, opts QueryOpts, qs string, ts time.Time)

Source from the content-addressed store, hash-verified

125// QueryEngine defines the interface for the *promql.Engine, so it can be replaced, wrapped or mocked.
126type QueryEngine interface {
127 NewInstantQuery(ctx context.Context, q storage.Queryable, opts QueryOpts, qs string, ts time.Time) (Query, error)
128 NewRangeQuery(ctx context.Context, q storage.Queryable, opts QueryOpts, qs string, start, end time.Time, interval time.Duration) (Query, error)
129}
130

Callers 15

testMethod · 0.65
queryFunction · 0.65
EngineQueryFuncFunction · 0.65
TestDerivFunction · 0.65
TestQueryErrorFunction · 0.65
TestQueryStatisticsFunction · 0.65
TestMaxQuerySamplesFunction · 0.65
TestAtModifierFunction · 0.65
TestSubquerySelectorFunction · 0.65

Implementers 3

closeCountingEnginerules/manager_test.go
Enginepromql/engine.go
fakeEngineweb/api/v1/api_test.go

Calls

no outgoing calls

Tested by 15

TestDerivFunction · 0.52
TestQueryErrorFunction · 0.52
TestQueryStatisticsFunction · 0.52
TestMaxQuerySamplesFunction · 0.52
TestAtModifierFunction · 0.52
TestSubquerySelectorFunction · 0.52
TestEngineOptsValidationFunction · 0.52
TestQueryLookbackDeltaFunction · 0.52