#include <userver/utils/retry_budget.hpp>
Class implements the same logic described in https://github.com/grpc/proposal/blob/master/A6-client-retries.md#throttling-configuration
Definition at line 33 of file retry_budget.hpp.
Public Member Functions | |
RetryBudget (const RetryBudgetSettings &settings) | |
void | AccountOk () noexcept |
Call after a request succeeds. | |
void | AccountFail () noexcept |
Call after a request fails. | |
bool | CanRetry () const |
Call before attempting a retry (but not before the initial request). | |
void | SetSettings (const RetryBudgetSettings &settings) |
void utils::RetryBudget::SetSettings | ( | const RetryBudgetSettings & | settings | ) |
Thread-safe relative to AccountOk/AccountFail/CanRetry. Not thread-safe relative other SetSettings method calls.