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

Method QueryRaw

integration/e2ecortex/client.go:481–494  ·  view source on GitHub ↗

QueryRaw runs a query directly against the querier API.

(query string, ts time.Time, headers map[string]string)

Source from the content-addressed store, hash-verified

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) {
482 u := &url.URL{
483 Scheme: "http",
484 Path: fmt.Sprintf("%s/api/prom/api/v1/query", c.querierAddress),
485 }
486 q := u.Query()
487 q.Set("query", query)
488
489 if !ts.IsZero() {
490 q.Set("time", FormatTime(ts))
491 }
492 u.RawQuery = q.Encode()
493 return c.query(u.String(), headers)
494}
495
496// SeriesRaw runs a series request directly against the querier API.
497func (c *Client) SeriesRaw(matches []string, startTime, endTime time.Time, headers map[string]string) (*http.Response, []byte, error) {

Calls 6

queryMethod · 0.95
FormatTimeFunction · 0.85
QueryMethod · 0.65
SetMethod · 0.65
EncodeMethod · 0.65
StringMethod · 0.65