utils

package
v0.0.0-...-be26699 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 3, 2015 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

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

func LoggedErrorStack(err error) error

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

func NetworkOperationWitDefaultRetries(networkOp func() error, description string) func() error

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

func RunCommand(cmd string, args ...string) error

Types

This section is empty.

Directories

Path Synopsis
ssh
Package ssh contains utilities for dealing with SSH connections, key management, and so on.
Package ssh contains utilities for dealing with SSH connections, key management, and so on.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL