File tree Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -101,9 +101,10 @@ func (o Opts) getLogicalOptimizers() []logicalplan.Optimizer {
101
101
102
102
// QueryOpts implements promql.QueryOpts but allows to override more engine default options.
103
103
type QueryOpts struct {
104
- lookbackDelta time.Duration
105
-
106
- enablePerStepStats bool
104
+ // These values are used to implement promql.QueryOpts, they have weird "Param" suffix because
105
+ // they are accessed by methods of the same name.
106
+ LookbackDeltaParam time.Duration
107
+ EnablePerStepStatsParam bool
107
108
108
109
// DecodingConcurrency can be used to override the DecodingConcurrency engine setting.
109
110
DecodingConcurrency int
@@ -112,16 +113,16 @@ type QueryOpts struct {
112
113
EnablePartialResponses bool
113
114
}
114
115
115
- func (opts QueryOpts ) LookbackDelta () time.Duration { return opts .lookbackDelta }
116
- func (opts QueryOpts ) EnablePerStepStats () bool { return opts .enablePerStepStats }
116
+ func (opts QueryOpts ) LookbackDelta () time.Duration { return opts .LookbackDeltaParam }
117
+ func (opts QueryOpts ) EnablePerStepStats () bool { return opts .EnablePerStepStatsParam }
117
118
118
119
func fromPromQLOpts (opts promql.QueryOpts ) * QueryOpts {
119
120
if opts == nil {
120
121
return & QueryOpts {}
121
122
}
122
123
return & QueryOpts {
123
- lookbackDelta : opts .LookbackDelta (),
124
- enablePerStepStats : opts .EnablePerStepStats (),
124
+ LookbackDeltaParam : opts .LookbackDelta (),
125
+ EnablePerStepStatsParam : opts .EnablePerStepStats (),
125
126
}
126
127
}
127
128
You can’t perform that action at this time.
0 commit comments