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

Method SeriesRaw

integration/e2ecortex/client.go:497–517  ·  view source on GitHub ↗

SeriesRaw runs a series request directly against the querier API.

(matches []string, startTime, endTime time.Time, headers map[string]string)

Source from the content-addressed store, hash-verified

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) {
498 u := &url.URL{
499 Scheme: "http",
500 Path: fmt.Sprintf("%s/api/prom/api/v1/series", c.querierAddress),
501 }
502 q := u.Query()
503
504 for _, m := range matches {
505 q.Add("match[]", m)
506 }
507
508 if !startTime.IsZero() {
509 q.Set("start", FormatTime(startTime))
510 }
511 if !endTime.IsZero() {
512 q.Set("end", FormatTime(endTime))
513 }
514
515 u.RawQuery = q.Encode()
516 return c.query(u.String(), headers)
517}
518
519// LabelNamesRaw runs a label names request directly against the querier API.
520func (c *Client) LabelNamesRaw(matches []string, startTime, endTime time.Time, headers map[string]string) (*http.Response, []byte, error) {

Calls 7

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