|
pulsatrix 1.1.0
|
When and how long to retry. More...
#include <provider.hpp>
Public Attributes | |
| int | max_retries = 2 |
| Retries after the first attempt. 0 turns retrying off. | |
| std::chrono::milliseconds | initial_backoff {1000} |
| The first backoff. Each retry doubles it up to max_backoff, and the wait is a random fraction of that ("full jitter"), so many clients don't retry in step. | |
| std::chrono::milliseconds | max_backoff {30'000} |
| std::chrono::milliseconds | max_retry_after {60'000} |
The longest retry-after to honor. A longer one fails at once instead of waiting. | |
| std::function< void(std::chrono::milliseconds)> | sleep |
| Waits between attempts; replaceable so tests don't sleep. Empty: really sleep. | |
| uint64_t | seed = 0x5eed |
| The seed for the jitter. | |
When and how long to retry.
| std::chrono::milliseconds pulsatrix::orch::RetryPolicy::initial_backoff {1000} |
The first backoff. Each retry doubles it up to max_backoff, and the wait is a random fraction of that ("full jitter"), so many clients don't retry in step.
| std::chrono::milliseconds pulsatrix::orch::RetryPolicy::max_backoff {30'000} |
| int pulsatrix::orch::RetryPolicy::max_retries = 2 |
Retries after the first attempt. 0 turns retrying off.
| std::chrono::milliseconds pulsatrix::orch::RetryPolicy::max_retry_after {60'000} |
The longest retry-after to honor. A longer one fails at once instead of waiting.
| uint64_t pulsatrix::orch::RetryPolicy::seed = 0x5eed |
The seed for the jitter.
| std::function<void(std::chrono::milliseconds)> pulsatrix::orch::RetryPolicy::sleep |
Waits between attempts; replaceable so tests don't sleep. Empty: really sleep.