From efe8e6fac8bf602b3f759aa217e236701afdb7db Mon Sep 17 00:00:00 2001 From: Joseph Woodward Date: Fri, 29 Apr 2022 06:34:50 +0100 Subject: [PATCH] Document WithTimeout options for Query/QueryRange (#1037) Signed-off-by: Joseph Woodward --- api/prometheus/v1/api.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/api/prometheus/v1/api.go b/api/prometheus/v1/api.go index 83b0efe..c45e03d 100644 --- a/api/prometheus/v1/api.go +++ b/api/prometheus/v1/api.go @@ -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