Document WithTimeout options for Query/QueryRange (#1037)

Signed-off-by: Joseph Woodward <joseph.woodward@xeuse.com>
This commit is contained in:
Joseph Woodward 2022-04-29 06:34:50 +01:00 committed by GitHub
parent 4dcf02ec7b
commit efe8e6fac8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -824,6 +824,8 @@ type apiOptions struct {
type Option func(c *apiOptions)
// WithTimeout can be used to provide an optional query evaluation timeout for Query and QueryRange.
// https://prometheus.io/docs/prometheus/latest/querying/api/#instant-queries
func WithTimeout(timeout time.Duration) Option {
return func(o *apiOptions) {
o.timeout = timeout