| 37 | } |
| 38 | |
| 39 | func NewFrontendClient(client httpgrpc.HTTPClient, timeout time.Duration, prometheusHTTPPrefix, queryResponseFormat string) *FrontendClient { |
| 40 | return &FrontendClient{ |
| 41 | client: client, |
| 42 | timeout: timeout, |
| 43 | prometheusHTTPPrefix: prometheusHTTPPrefix, |
| 44 | queryResponseFormat: queryResponseFormat, |
| 45 | decoders: map[string]Decoder{ |
| 46 | jsonDecoder.ContentType(): jsonDecoder, |
| 47 | protobufDecoder.ContentType(): protobufDecoder, |
| 48 | }, |
| 49 | } |
| 50 | } |
| 51 | |
| 52 | func (p *FrontendClient) makeRequest(ctx context.Context, qs string, ts time.Time) (*httpgrpc.HTTPRequest, error) { |
| 53 | args := make(url.Values) |