#include <fastmm/net/backoff.hpp>
|
| | ExponentialBackoff (BackoffConfig cfg={}, std::uint64_t seed=0x5eed) noexcept |
| |
| std::uint32_t | next_ms () noexcept |
| | Delay for the current attempt in milliseconds; advances the attempt counter.
|
| |
| void | reset () noexcept |
| |
| std::uint32_t | attempt () const noexcept |
| |
| const BackoffConfig & | config () const noexcept |
| |
| std::uint32_t | capped_delay (std::uint32_t attempt) const noexcept |
| | Upper bound of the delay for attempt n (before jitter) - exposed for tests/metrics.
|
| |
◆ ExponentialBackoff()
| fastmm::net::ExponentialBackoff::ExponentialBackoff |
( |
BackoffConfig |
cfg = {}, |
|
|
std::uint64_t |
seed = 0x5eed |
|
) |
| |
|
inlineexplicitnoexcept |
◆ next_ms()
| std::uint32_t fastmm::net::ExponentialBackoff::next_ms |
( |
| ) |
|
|
inlinenoexcept |
Delay for the current attempt in milliseconds; advances the attempt counter.
◆ reset()
| void fastmm::net::ExponentialBackoff::reset |
( |
| ) |
|
|
inlinenoexcept |
◆ attempt()
| std::uint32_t fastmm::net::ExponentialBackoff::attempt |
( |
| ) |
const |
|
inlinenoexcept |
◆ config()
| const BackoffConfig & fastmm::net::ExponentialBackoff::config |
( |
| ) |
const |
|
inlinenoexcept |
◆ capped_delay()
| std::uint32_t fastmm::net::ExponentialBackoff::capped_delay |
( |
std::uint32_t |
attempt | ) |
const |
|
inlinenoexcept |
Upper bound of the delay for attempt n (before jitter) - exposed for tests/metrics.