YOrch 1.0.0
Loading...
Searching...
No Matches
yorch::retry_fixed_policy Struct Reference

Retry policy that allows a fixed number of additional retries. More...

#include <retry.hpp>

Public Member Functions

constexpr bool should_retry (std::size_t retry_count) const noexcept
 

Static Public Member Functions

template<typename Raw >
static constexpr auto on_exhausted (Raw &&raw) noexcept
 

Public Attributes

std::size_t max_retries = 0
 

Detailed Description

Retry policy that allows a fixed number of additional retries.

max_retries counts retries after the initial attempt. For example, retry_fixed_policy {2} means "run once, then allow up to two more attempts if the task keeps returning `retry`". When that retry budget is exhausted, the adapter converts the final retry result into failure.

Definition at line 16 of file retry.hpp.

Member Function Documentation

◆ on_exhausted()

template<typename Raw >
static constexpr auto yorch::retry_fixed_policy::on_exhausted ( Raw &&  raw)
inlinestaticconstexprnoexcept

Definition at line 24 of file retry.hpp.

◆ should_retry()

constexpr bool yorch::retry_fixed_policy::should_retry ( std::size_t  retry_count) const
inlineconstexprnoexcept

Definition at line 19 of file retry.hpp.

Member Data Documentation

◆ max_retries

std::size_t yorch::retry_fixed_policy::max_retries = 0

Definition at line 17 of file retry.hpp.


The documentation for this struct was generated from the following file: