Skip to content

Commit

Permalink
Document WithTimeout options for Query/QueryRange
Browse files Browse the repository at this point in the history
Signed-off-by: Joseph Woodward <joseph.woodward@xeuse.com>
  • Loading branch information
josephwoodward committed Apr 26, 2022
1 parent 4dcf02e commit 2ce396b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions api/prometheus/v1/api.go
Expand Up @@ -824,6 +824,7 @@ type apiOptions struct {

type Option func(c *apiOptions)

// WithTimeout can be used to provide an optional query evaluation timeout for Query and QueryRange.
func WithTimeout(timeout time.Duration) Option {
return func(o *apiOptions) {
o.timeout = timeout
Expand Down

0 comments on commit 2ce396b

Please sign in to comment.