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§
- Retry
Header Options - Options for reading retry delays from response headers.
Enums§
- Retry
Class - 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
optionsatnow. - 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.