-
Notifications
You must be signed in to change notification settings - Fork 9.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
etcdctl: use user specified timeout value for entire command execution
etcdctl should be capable to use a user specified timeout value for total command execution, not only per request timeout. This commit adds a new option --total-timeout to the command. The value passed via this option is used as a timeout value of entire command execution. This commit introduces a new rule of timeout for the commands: - If a command issues only one API call, the call is executed in a total context. The total context is created with contextWithTotalTimeout() and its timeout is passed to etcdctl with --total-timeout. It means that the API call can use whole timeout. - if a command issues more than twice API calls, the calls is executed in a per request context. The per request context is created with contextWithPerRequestTimeout() and its timeout is passed passed to etcdctl with --timeout. The context should be a child of the total context. Fixes coreos#3517
- Loading branch information
Showing
6 changed files
with
53 additions
and
31 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
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