-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add RetryWithContext() and respect cancellation while sleeping
This is a breaking change for developers using custom strategies. However, there shouldn't be any impact on code using the strategies included in this package. Because the time.Sleep() call is now abstracted, strategies are tested without actually sleeping, and the strategies don't need to be aware of contexts. Context is passed through to the action in case the action is defined separately from the retry.RetryWithContext() call, is reused at multiple points, etc.
- Loading branch information
1 parent
272ad12
commit 60652e5
Showing
5 changed files
with
216 additions
and
94 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.