* Add timeout parameter for queries
Signed-off-by: Joseph Woodward <joseph.woodward@xeuse.com>
* Update api/prometheus/v1/api.go
Co-authored-by: Kemal Akkoyun <kakkoyun@users.noreply.github.com>
Signed-off-by: Joseph Woodward <joseph.woodward@xeuse.com>
* Update api/prometheus/v1/api.go
Co-authored-by: Kemal Akkoyun <kakkoyun@users.noreply.github.com>
Signed-off-by: Joseph Woodward <joseph.woodward@xeuse.com>
* Pass timeout as stringified time.Duration instead of millisecond value
Signed-off-by: Joseph Woodward <joseph.woodward@xeuse.com>
* Update QueryRange API to support timeouts
Signed-off-by: Joseph Woodward <joseph.woodward@xeuse.com>
* Add timeout to test request params
Signed-off-by: Joseph Woodward <joseph.woodward@xeuse.com>
Co-authored-by: Kemal Akkoyun <kakkoyun@users.noreply.github.com>
* Added example api code showing how to add auth tokens and user agents to prom client.
Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>
* Ran go mod tidy.
Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>
The part after the underscore has to be lowercase. Otherwise, it is
seen as the name of a Go type, which doesn't exist, which will result
in the example not showing up in godoc.
Signed-off-by: beorn7 <beorn@grafana.com>