forked from kubernetes/kubernetes
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
flowcontrol.Backoff add init Duration and retry nb
For the "Backoff policy and failed pod limit" implementation (kubernetes/community#583), we need to retrieve the number of backoff retry and also be able to set a different initial backoff duration for each entry. This Pull request adds two new methods to ```Backoff```: - ```NextWithInitDuration```: as ```Next``` the purpose of this method is to increment the backoff delay exponentially. In addition, you need to provide the initial delay duration if the entry is not already present. - ```GetWithRetryNumber```: returns the backoff delay associated to an entry and also the retry number corresponding to the number of time that the ```Next|GetWithRetryNumber``` has been call.
- Loading branch information
1 parent
e3210c6
commit 06cf54f
Showing
2 changed files
with
111 additions
and
4 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