Codebase list golang-github-go-kit-kit / 5abc2c8
Clarify intention in Callback args and return values. rossmcf 7 years ago
1 changed file(s) with 2 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
1313 // encountered. Should return whether the Retry function should continue trying,
1414 // and a custom error message if desired. The error message may be nil, but a
1515 // 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)
1818
1919 // Retry wraps a service load balancer and returns an endpoint oriented load
2020 // balancer for the specified service method.