|
1 | 1 | //! Robust, retrying wrapper around Alloy providers. |
2 | 2 | //! |
3 | | -//! This module exposes [`RobustProvider`], a small wrapper around Alloy's |
| 3 | +//! This module exposes [`RobustProvider`](crate::robust_provider), a small wrapper around Alloy's |
4 | 4 | //! `RootProvider` that adds: |
5 | 5 | //! * bounded per-call timeouts |
6 | 6 | //! * exponential backoff retries |
7 | 7 | //! * transparent failover between a primary and one or more fallback providers |
8 | 8 | //! * more robust WebSocket block subscriptions with automatic reconnection |
9 | 9 | //! |
10 | | -//! Use [`RobustProviderBuilder`] to construct a provider with sensible defaults |
11 | | -//! and optional fallbacks, or implement the [`IntoRobustProvider`] and [`IntoRootProvider`] |
12 | | -//! traits to support custom providers. |
| 10 | +//! Use [`RobustProviderBuilder`](crate::robust_provider::RobustProviderBuilder) to construct a |
| 11 | +//! provider with sensible defaults and optional fallbacks, or implement the [`IntoRobustProvider`] |
| 12 | +//! and [`IntoRootProvider`] traits to support custom providers. |
13 | 13 | //! |
14 | 14 | //! # How it works |
15 | 15 | //! |
16 | 16 | //! All RPC calls performed through [`RobustProvider`] are wrapped in a total |
17 | 17 | //! timeout and retried with exponential backoff up to `max_retries`. If the |
18 | 18 | //! primary provider keeps failing, the call is retried against the configured |
19 | 19 | //! fallback providers in the order they were added. For subscriptions, |
20 | | -//! [`RobustSubscription`] also tracks lag, switches to fallbacks on repeated |
21 | | -//! failure, and periodically attempts to reconnect to the primary provider. |
| 20 | +//! [`RobustSubscription`](crate::robust_provider::RobustSubscription) also tracks lag, switches to |
| 21 | +//! fallbacks on repeated failure, and periodically attempts to reconnect to the primary provider. |
22 | 22 | //! |
23 | 23 | //! # Examples |
24 | 24 | //! |
|
0 commit comments