Skip to content

Commit efe8e6f

Browse files
Document WithTimeout options for Query/QueryRange (#1037)
Signed-off-by: Joseph Woodward <[email protected]>
1 parent 4dcf02e commit efe8e6f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

api/prometheus/v1/api.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -824,6 +824,8 @@ type apiOptions struct {
824824

825825
type Option func(c *apiOptions)
826826

827+
// WithTimeout can be used to provide an optional query evaluation timeout for Query and QueryRange.
828+
// https://prometheus.io/docs/prometheus/latest/querying/api/#instant-queries
827829
func WithTimeout(timeout time.Duration) Option {
828830
return func(o *apiOptions) {
829831
o.timeout = timeout

0 commit comments

Comments
 (0)