Skip to content

Commit 1dac73d

Browse files
committed
docs tweaks
1 parent ed82298 commit 1dac73d

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

internal/retry/retry.go

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,17 @@ type RetryCallback = func(context.Context, *FuncInfo) error
1818
// Run() runs each given callback in parallel. If none of them fail,
1919
// then no error is returned.
2020
//
21-
// If one of them fails, the other allbacks' contexts are canceled.
21+
// If one of them fails, the other callbacks' contexts are canceled.
2222
// If the error is non-transient, it's returned. If the error is transient,
23-
// though, then every function will be retried.
23+
// though, then the retryer reruns each callback.
2424
//
25-
// The retries last until a function fails and it's exceeded the retryer's
26-
// limit without either a success or being canceled (i.e., because another
27-
// thread fails).
25+
// The retryer tracks the last time each callback either a) succeeded or b)
26+
// was canceled. Whenever a callback fails, the retryer checks how long it
27+
// has gone since a success/cancellation. If that time period exceeds the
28+
// retryer's duration limit, then the retry loop ends, and a
29+
// RetryDurationLimitExceededErr is returned.
2830
//
29-
// Note that, if a given callback runs multiple potentially-retryable reqeusts,
31+
// Note that, if a given callback runs multiple potentially-retryable requests,
3032
// each successful request should be noted in the callback's FuncInfo.
3133
// See that struct's documentation for more details.
3234
//

0 commit comments

Comments
 (0)