Clarify intention in Callback args and return values.
rossmcf
7 years ago
13 | 13 | // encountered. Should return whether the Retry function should continue trying, |
14 | 14 | // and a custom error message if desired. The error message may be nil, but a |
15 | 15 | // true/false is always expected. In all cases if the error message is supplied, |
16 | // thecurrent error will be replaced. | |
17 | type Callback func(n int, err error) (cont bool, cbErr error) | |
16 | // the current error will be replaced. | |
17 | type Callback func(n int, received error) (keepTrying bool, cbErr error) | |
18 | 18 | |
19 | 19 | // Retry wraps a service load balancer and returns an endpoint oriented load |
20 | 20 | // balancer for the specified service method. |