Documentation ¶
Index ¶
- Variables
- func LoggedErrorStack(err error) error
- func NetworkOperationWitDefaultRetries(networkOp func() error, description string) func() error
- func NetworkOperationWithRetries(strategy utils.AttemptStrategy, networkOp func() error, description string) func() error
- func RunCommand(cmd string, args ...string) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // DefaultNetworkOperationRetryDelay is the default time // to wait between operation retries. DefaultNetworkOperationRetryDelay = 30 * time.Second // DefaultNetworkOperationAttempts is the default number // of attempts before giving up. DefaultNetworkOperationAttempts = 10 )
Functions ¶
func LoggedErrorStack ¶
LoggedErrorStack is a developer helper function that will cause the error stack of the error to be printed out at error severity if and only if the "log-error-stack" feature flag has been specified. The passed in error is also the return value of this function.
func NetworkOperationWitDefaultRetries ¶
NetworkOperationWithDefaultRetries calls the supplied function and if it returns a network error which is temporary, will retry a number of times before giving up. A default attempt strategy is used.
func NetworkOperationWithRetries ¶
func NetworkOperationWithRetries(strategy utils.AttemptStrategy, networkOp func() error, description string) func() error
NetworkOperationWithRetries calls the supplied function and if it returns a network error which is temporary, will retry a number of times before giving up.
func RunCommand ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.