Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DoWithApplicationRetry ¶
func DoWithApplicationRetry( cfg *shared.Configuration, request *http.Request, ) (*http.Response, time.Duration, error)
DoWithApplicationRetry executes an HTTP request with application-level retry logic. This is the shared equivalent of the per-product callAPI method.
Retry behaviour:
- 502/503/504: retries with backoff (skips POST)
- 429: retries honoring Retry-After header, falls back to waitTime
- Other status codes or transport errors: returns immediately
- Respects context cancellation during backoff
Interaction with RoundTripper ¶
client.Do invokes the configured http.RoundTripper, which may be a RoundTripper. When a multi-server Strategy is active, transport-level network errors and status codes listed in FailoverOnStatusCodes are handled by the round tripper before this function sees the response: it either receives a successful response or err != nil after all failover attempts are exhausted.
Status codes NOT in FailoverOnStatusCodes (including the 502/503/504/429 that this function retries on) pass through normally.
Worst-case total attempts: Configuration.MaxRetries × Options.MaxRetries.
Types ¶
This section is empty.