helpers

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateTmpFile

func CreateTmpFile(contents string) (string, error)

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 Retryable added in v0.0.28

func Retryable(msg string) bool

func RetryableCode added in v0.1.2

func RetryableCode(code int) bool

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 Tar added in v0.1.1

func Tar(dir string) (string, string, error)

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

type ExternalFuncWithString func() (output string, err error)

Directories

Path Synopsis
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

Jump to

Keyboard shortcuts

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