First release under the failnext name.
This release is a larger redesign of rcpx, with a simpler focus: ordered failover across a small set of HTTP or RPC providers.
failnext is now protocol-neutral. It no longer parses JSON-RPC or tries to decide which operations are safe to repeat. Instead, the application controls when failover is allowed, which providers are eligible, and whether a particular provider should be tried first.
For go-ethereum applications, this makes it possible to keep the routing policy close to the code that understands the operation: allow reads to fail over, keep sensitive writes on one provider, skip RPCs the application considers lagging or degraded, and prefer the provider that handled an earlier operation for a follow-up request.
The module path has changed from github.com/yermakovsa/rcpx to:
github.com/yermakovsa/failnextThe API has changed significantly from rcpx, so upgrading is not just a package rename.
Changes
- Rename
rcpxtofailnext - Make the transport protocol-neutral
- Add explicit per-request failover allow and deny controls
- Add application-controlled endpoint eligibility
- Add preferred-endpoint routing for related requests
- Rework cooldown around provider failures
- Add structured events for attempts, skips, replay failures, and final results
- Add
FailoverErrorwith per-endpoint attempt information - Improve response fallback and request replay behavior
- Rewrite the README around practical RPC failover use cases
- Add production-oriented package and go-ethereum examples
See the README and examples for the new API and migration patterns.