Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
Signed-off-by: Ben Ye <benye@amazon.com>
  • Loading branch information
yeya24 committed Nov 9, 2022
1 parent 445bc49 commit 02b0e36
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions pkg/queryfrontend/roundtrip.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,16 +70,13 @@ func NewTripperware(config Config, reg prometheus.Registerer, logger log.Logger)
if err != nil {
return nil, err
}
queryInstantTripperware, err := newInstantQueryTripperware(
queryInstantTripperware := newInstantQueryTripperware(
config.NumShards,
queryRangeLimits,
queryInstantCodec,
prometheus.WrapRegistererWith(prometheus.Labels{"tripperware": "query_instant"}, reg),
config.ForwardHeaders,
)
if err != nil {
return nil, err
}
return func(next http.RoundTripper) http.RoundTripper {
return newRoundTripper(next, queryRangeTripperware(next), labelsTripperware(next), queryInstantTripperware(next), reg)
}, nil
Expand Down Expand Up @@ -329,7 +326,7 @@ func newInstantQueryTripperware(
codec queryrange.Codec,
reg prometheus.Registerer,
forwardHeaders []string,
) (queryrange.Tripperware, error) {
) queryrange.Tripperware {
instantQueryMiddlewares := []queryrange.Middleware{}
m := queryrange.NewInstrumentMiddlewareMetrics(reg)
if numShards > 0 {
Expand All @@ -346,7 +343,7 @@ func newInstantQueryTripperware(
return queryrange.RoundTripFunc(func(r *http.Request) (*http.Response, error) {
return rt.RoundTrip(r)
})
}, nil
}
}

// shouldCache controls what kind of Thanos request should be cached.
Expand Down

0 comments on commit 02b0e36

Please sign in to comment.