1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
//! Async retry with exponential backoff and automatic tracing.
//!
//! Each retry attempt runs inside a `tracing::span!` so it appears in
//! distributed traces. If `altair-otel` is initialized in the same process,
//! retries flow to OTLP automatically.
//!
//! # Example
//!
//! ```no_run
//! use altair_retry::{retry, Config};
//! use std::time::Duration;
//!
//! # async fn run() -> altair_retry::Result<()> {
//! # async fn ping() -> std::io::Result<()> { Ok(()) }
//! let cfg = Config::builder()
//! .name("db.connect")
//! .max_retries(3)
//! .initial_interval(Duration::from_millis(100))
//! .build();
//!
//! retry(cfg, || async { ping().await }).await?;
//! # Ok(()) }
//! ```
pub use ;
pub use ;
pub use retry;
// Re-exports for one-dep ergonomics
pub use CancellationToken;