#include <backoff.h>
Classes | |
class | Options |
Public Member Functions | |
BackOff (const Options &options) | |
Initialize backoff machinery - does not need to be destroyed. More... | |
Timestamp | NextAttemptTime () |
Returns the time at which the next attempt should start. More... | |
void | Reset () |
Private Attributes | |
Duration | current_backoff_ |
current delay before retries More... | |
bool | initial_ |
const Options | options_ |
absl::BitGen | rand_gen_ |
Implementation of the backoff mechanism described in doc/connection-backoff.md
Initialize backoff machinery - does not need to be destroyed.
Definition at line 29 of file backoff.cc.
Timestamp grpc_core::BackOff::NextAttemptTime | ( | ) |
Returns the time at which the next attempt should start.
Definition at line 31 of file backoff.cc.
void grpc_core::BackOff::Reset | ( | ) |
Reset the backoff, so the next value returned by NextAttemptTime() will be the time of the second attempt (rather than the Nth).
Definition at line 44 of file backoff.cc.
|
private |
|
private |