File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -25,11 +25,17 @@ type Options struct {
25
25
RandomizationFactor float64
26
26
Closer <- chan struct {} // Optionally end retry loop channel close
27
27
// Maximum number of retries; attempts = MaxRetries + 1. (0 for infinite)
28
+ //
29
+ // If both MaxRetries and MaxDuration are set, the loop will stop when the
30
+ // first of the two conditions is met.
28
31
MaxRetries int
29
32
// MaxDuration is the maximum duration for which the retry loop will make
30
33
// attempts. Once the deadline has elapsed, the loop will stop attempting
31
34
// retries.
32
35
// The loop will run for at least one iteration. (0 for infinite)
36
+ //
37
+ // If both MaxRetries and MaxDuration are set, the loop will stop when the
38
+ // first of the two conditions is met.
33
39
MaxDuration time.Duration
34
40
// PreemptivelyCancel indicates whether the retry loop should cancel itself if
35
41
// it determines that the next backoff would exceed the MaxDuration.
You can’t perform that action at this time.
0 commit comments