Browse Source

Remove unnecessary `SetQueryLogger` method on `QueryEngine` interface

Signed-off-by: Charles Korn <charles.korn@grafana.com>
pull/13713/head
Charles Korn 9 months ago
parent
commit
26262a1eb7
No known key found for this signature in database
  1. 1
      promql/engine.go
  2. 2
      web/api/v1/api_test.go

1
promql/engine.go

@ -117,7 +117,6 @@ func (e ErrStorage) Error() string {
// QueryEngine defines the interface for the *promql.Engine, so it can be replaced, wrapped or mocked.
type QueryEngine interface {
SetQueryLogger(l QueryLogger)
NewInstantQuery(ctx context.Context, q storage.Queryable, opts QueryOpts, qs string, ts time.Time) (Query, error)
NewRangeQuery(ctx context.Context, q storage.Queryable, opts QueryOpts, qs string, start, end time.Time, interval time.Duration) (Query, error)
}

2
web/api/v1/api_test.go

@ -3884,8 +3884,6 @@ type fakeEngine struct {
query fakeQuery
}
func (e *fakeEngine) SetQueryLogger(promql.QueryLogger) {}
func (e *fakeEngine) NewInstantQuery(ctx context.Context, q storage.Queryable, opts promql.QueryOpts, qs string, ts time.Time) (promql.Query, error) {
return &e.query, nil
}

Loading…
Cancel
Save