Documentation ¶
Index ¶
- Variables
- func GetBool(r *http.Request, argKey string) bool
- func GetDenyPartialResponse(r *http.Request) bool
- func GetDuration(r *http.Request, argKey string, defaultValue int64) (int64, error)
- func GetMaxQueryDuration(r *http.Request) time.Duration
- func GetTime(r *http.Request, argKey string, defaultMs int64) (int64, error)
- type Deadline
Constants ¶
This section is empty.
Variables ¶
var ( // StorageTimeout limits the duration of query execution on every vmstorage node. // See https://github.com/VictoriaMetrics/VictoriaMetrics/issues/711 StorageTimeout = flag.Duration("search.storageTimeout", 0, "The timeout for per-storage query processing; "+ "this allows returning partial responses if certain -storageNode instances slowly process the query; "+ "see also -search.maxQueryDuration and -search.denyPartialResponse command-line flags") )
Functions ¶
func GetDenyPartialResponse ¶
GetDenyPartialResponse returns whether partial responses are denied.
func GetDuration ¶
GetDuration returns duration from the given argKey query arg.
func GetMaxQueryDuration ¶ added in v1.41.1
GetMaxQueryDuration returns the maximum duration for query from r.
func GetTime ¶
GetTime returns time from the given argKey query arg.
If argKey is missing in r, then defaultMs rounded to seconds is returned. The rounding is needed in order to align query results in Grafana executed at different times. See https://github.com/VictoriaMetrics/VictoriaMetrics/issues/720
Types ¶
type Deadline ¶
type Deadline struct {
// contains filtered or unexported fields
}
Deadline contains deadline with the corresponding timeout for pretty error messages.
func GetDeadlineForExport ¶
GetDeadlineForExport returns deadline for the given request to /api/v1/export.
func GetDeadlineForQuery ¶
GetDeadlineForQuery returns deadline for the given query r.
func NewDeadline ¶
NewDeadline returns deadline for the given timeout.
flagHint must contain a hit for command-line flag, which could be used in order to increase timeout.