QueryRangeRaw runs a ranged query directly against the querier API.
(query string, start, end time.Time, step time.Duration, headers map[string]string)
| 465 | |
| 466 | // QueryRangeRaw runs a ranged query directly against the querier API. |
| 467 | func (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. |
| 481 | func (c *Client) QueryRaw(query string, ts time.Time, headers map[string]string) (*http.Response, []byte, error) { |