aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/lib/support/backoff.h
diff options
context:
space:
mode:
authorGravatar Mark D. Roth <roth@google.com>2016-12-05 07:03:49 -0800
committerGravatar Mark D. Roth <roth@google.com>2016-12-05 07:03:49 -0800
commit16eaa454154122a5db61cd8058794af6c5fe9077 (patch)
treebccded87d75d5fdadf2a01a6498f0b7c0cf92650 /src/core/lib/support/backoff.h
parent977f5d4e7dc8bdf21bda2e8b9a7a232f88de8e73 (diff)
parent8e9a492ad910ad66751fc1d0015e4ef051b62ddc (diff)
Merge remote-tracking branch 'upstream/master' into client_channel_init_cleanup
Diffstat (limited to 'src/core/lib/support/backoff.h')
-rw-r--r--src/core/lib/support/backoff.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/core/lib/support/backoff.h b/src/core/lib/support/backoff.h
index 6d40c15546..5e9b740824 100644
--- a/src/core/lib/support/backoff.h
+++ b/src/core/lib/support/backoff.h
@@ -37,7 +37,9 @@
#include <grpc/support/time.h>
typedef struct {
- /// const: multiplier between retry attempts
+ /// const: how long to wait after the first failure before retrying
+ int64_t initial_connect_timeout;
+ /// const: factor with which to multiply backoff after a failed retry
double multiplier;
/// const: amount to randomize backoffs
double jitter;
@@ -54,7 +56,8 @@ typedef struct {
} gpr_backoff;
/// Initialize backoff machinery - does not need to be destroyed
-void gpr_backoff_init(gpr_backoff *backoff, double multiplier, double jitter,
+void gpr_backoff_init(gpr_backoff *backoff, int64_t initial_connect_timeout,
+ double multiplier, double jitter,
int64_t min_timeout_millis, int64_t max_timeout_millis);
/// Begin retry loop: returns a timespec for the NEXT retry