userver: utils::RetryBudget Class Reference
Loading...
Searching...
No Matches
utils::RetryBudget Class Referencefinal

#include <userver/utils/retry_budget.hpp>

Detailed Description

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)
 

Member Function Documentation

◆ SetSettings()

void utils::RetryBudget::SetSettings ( const RetryBudgetSettings & settings)

Thread-safe relative to AccountOk/AccountFail/CanRetry. Not thread-safe relative other SetSettings method calls.


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