Documentation ¶
Index ¶
- func AbsPath(path string) string
- func CreateTmpFile(contents string) (string, error)
- func ExecToSuccessWithTimeout(funk ExternalFuncWithString, log logr.Logger, timeout, interval time.Duration) (string, error)
- func Retryable(msg string) bool
- func RetryableCode(code int) bool
- func RunToSuccessWithTimeout(funk ExternalFunc, timeout, interval time.Duration) error
- func Tar(dir string) (string, string, error)
- func UniqueStrings(stringSlice []string) []string
- func WaitForCommandCompletion(ui *termui.UI, message string, funk ExternalFuncWithString) (string, error)
- type ExternalFunc
- type ExternalFuncWithString
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateTmpFile ¶
CreateTmpFile creates a temporary file on the disk with the given contents and returns the path to it and an error if something goes wrong.
func ExecToSuccessWithTimeout ¶
func ExecToSuccessWithTimeout(funk ExternalFuncWithString, log logr.Logger, timeout, interval time.Duration) (string, error)
ExecToSuccessWithTimeout retries the given function with string & error return, until it either succeeds of the timeout is reached. It retries every "interval" duration.
func RetryableCode ¶ added in v0.1.2
func RunToSuccessWithTimeout ¶
func RunToSuccessWithTimeout(funk ExternalFunc, timeout, interval time.Duration) error
RunToSuccessWithTimeout retries the given function with error return, until it either succeeds or the timeout is reached. It retries every "interval" duration.
func UniqueStrings ¶ added in v0.9.0
UniqueStrings process the string slice and returns a slice where duplicate strings are removed. The order of strings is not touched. It does not assume a specific order.
func WaitForCommandCompletion ¶
func WaitForCommandCompletion(ui *termui.UI, message string, funk ExternalFuncWithString) (string, error)
WaitForCommandCompletion prints progress dots until the func completes
Types ¶
type ExternalFunc ¶
type ExternalFunc func() (err error)
type ExternalFuncWithString ¶
Directories ¶
Path | Synopsis |
---|---|
Package authtoken creates JWT tokens to secure the websockets connections
|
Package authtoken creates JWT tokens to secure the websockets connections |
Package bytes is a helper to convert bytes to a human readable string
|
Package bytes is a helper to convert bytes to a human readable string |
tailer
tailer manages objects which tail the logs of a collection of pods specified by a label selector.
|
tailer manages objects which tail the logs of a collection of pods specified by a label selector. |
Package randstr provides functions for the generation of random strings.
|
Package randstr provides functions for the generation of random strings. |
Package routes implements registered urls and parameter substitution
|
Package routes implements registered urls and parameter substitution |
Package tracelog provides a logger for debugging and tracing This logger will not print anything, unless TRACE_LEVEL is at least 1
|
Package tracelog provides a logger for debugging and tracing This logger will not print anything, unless TRACE_LEVEL is at least 1 |