Repository navigation
This release adds configurable per-attempt timeouts and request-scoped timeout overrides.
Use Config.AttemptTimeout to set a timeout for each provider attempt. WithAttemptTimeout lets you override the configured timeout for a request or explicitly disable it by passing zero.
On timeout, failnext cancels the attempt context and waits for Base.RoundTrip to return before applying the normal failover rules. Response-body reads are not timed.
Changes
- Add per-attempt timeouts through
Config.AttemptTimeout - Add request-scoped timeout overrides through
WithAttemptTimeout - Add
ErrAttemptTimeout, which also matchescontext.DeadlineExceeded - Add a rate-limit quarantine example using
OnEventandEligible - Add a latency-based quarantine example using attempt durations
- Improve README documentation for per-attempt timeouts
- Update OpenTelemetry dependencies in the go-ethereum examples to address a security advisory
Per-attempt timeouts are disabled by default, and existing failover behavior remains unchanged unless a timeout is configured.
The separate examples/goethereum module now requires Go 1.26. The root failnext module's Go requirement remains unchanged.
See the README and examples for usage examples.