Prometheus: Remove cache, pass headers in request, simplify client creation for resource calls and custom client (#51436)

* Remove cache, pass headers in request, simplify client creation

* Add test for http options creation
This commit is contained in:
Andrej Ocenas
2022-07-04 11:18:45 +02:00
committed by GitHub
parent b7e22c37a8
commit 3df34fe064
17 changed files with 244 additions and 924 deletions
@@ -118,7 +118,10 @@ func loadStoredQuery(fileName string) (*backend.QueryDataRequest, error) {
}
func runQuery(response []byte, q *backend.QueryDataRequest, wide bool) (*backend.QueryDataResponse, error) {
tCtx := setup(wide)
tCtx, err := setup(wide)
if err != nil {
return nil, err
}
res := &http.Response{
StatusCode: 200,
Body: ioutil.NopCloser(bytes.NewReader(response)),