|
iceberg-cpp
|
Utility class for running tasks with retry logic. More...
#include <retry_util.h>
Public Member Functions | |
| RetryRunner (RetryConfig config={}) | |
| Construct a RetryRunner with the given configuration. | |
| template<detail::RetryTask F> | |
| auto | Run (F &&task, int32_t *attempt_counter=nullptr) -> std::remove_cvref_t< std::invoke_result_t< F & > > |
| Run a task that returns a Result<T> | |
Utility class for running tasks with retry logic.
When retries are enabled (num_retries > 0), RetryPolicy must be an enabled policy such as retry::OnlyRetryOn<...> or retry::StopRetryOn<...>.
|
inline |
Run a task that returns a Result<T>
When num_retries > 0, RetryPolicy must allow retrying matching errors.
TODO: Replace attempt_counter with a metrics reporter once it is available.