Skip to main content

Module retry

Module retry 

Source
Expand description

Classification of upstream HTTP responses and transport failures.

Outbound clients all need the same decision: was this failure worth retrying, and if so, after how long? classify_http_status answers that from the status code and response headers alone, so it stays a pure function that is easy to test and free of any particular HTTP client.

Structs§

RetryHeaderOptions
Options for reading retry delays from response headers.

Enums§

RetryClass
How a caller should react to a failed upstream request.

Functions§

classify_http_status
Classifies an upstream HTTP response by status and headers.
classify_http_status_with_options
Classifies an upstream HTTP response with configurable retry header parsing.
classify_http_status_with_options_at
Classifies an upstream HTTP response using options at now.
classify_transport_error
Classifies a transport failure that never produced a response.
retry_after_from_headers
Reads the retry delay relative to the current time.
retry_after_from_headers_at
Reads the retry delay from the vendor headers first, then Retry-After.
retry_after_from_headers_with_options
Reads a retry delay relative to the current time using options.
retry_after_from_headers_with_options_at
Reads a retry delay using configurable vendor header parsing at now.