MCPcopy Create free account
hub / github.com/cortexproject/cortex / NewFrontendClient

Function NewFrontendClient

pkg/ruler/frontend_client.go:39–50  ·  view source on GitHub ↗
(client httpgrpc.HTTPClient, timeout time.Duration, prometheusHTTPPrefix, queryResponseFormat string)

Source from the content-addressed store, hash-verified

37}
38
39func 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
52func (p *FrontendClient) makeRequest(ctx context.Context, qs string, ts time.Time) (*httpgrpc.HTTPRequest, error) {
53 args := make(url.Values)

Callers 5

createFrontendClientMethod · 0.70
TestTimeoutFunction · 0.70
TestNoOrgIdFunction · 0.70

Calls 1

ContentTypeMethod · 0.65

Tested by 4

TestTimeoutFunction · 0.56
TestNoOrgIdFunction · 0.56