MCPcopy Index your code
hub / github.com/cortexproject/cortex / QueryRangeRaw

Method QueryRangeRaw

integration/e2ecortex/client.go:467–478  ·  view source on GitHub ↗

QueryRangeRaw runs a ranged query directly against the querier API.

(query string, start, end time.Time, step time.Duration, headers map[string]string)

Source from the content-addressed store, hash-verified

465
466// QueryRangeRaw runs a ranged query directly against the querier API.
467func (c *Client) QueryRangeRaw(query string, start, end time.Time, step time.Duration, headers map[string]string) (*http.Response, []byte, error) {
468 addr := fmt.Sprintf(
469 "http://%s/api/prom/api/v1/query_range?query=%s&start=%s&end=%s&step=%s",
470 c.querierAddress,
471 url.QueryEscape(query),
472 FormatTime(start),
473 FormatTime(end),
474 strconv.FormatFloat(step.Seconds(), 'f', -1, 64),
475 )
476
477 return c.query(addr, headers)
478}
479
480// QueryRaw runs a query directly against the querier API.
481func (c *Client) QueryRaw(query string, ts time.Time, headers map[string]string) (*http.Response, []byte, error) {

Calls 2

queryMethod · 0.95
FormatTimeFunction · 0.85