Documentation
¶
Index ¶
- Variables
- func GetLogStatus() bool
- func PollForever(interval time.Duration, done <-chan string, condition ConditionFunc) (string, error)
- func PollRetry(retry int, interval time.Duration, condition ConditionFunc) error
- func PollUntil(interval time.Duration, done <-chan string, timeout time.Duration, ...) (string, error)
- func RetryCmd(retry int, cmd *exec.Cmd) ([]byte, error)
- func RetryCmdLogs(cmd *exec.Cmd, retry bool) ([]byte, error)
- func SetLogStatus(logCommandRunSuccess bool)
- func WaitCmd(timeout time.Duration, cmd_result *types.CmdResult) error
- func WaitUntil(timeout time.Duration, condition ConditionCHFunc) (string, error)
- type ConditionCHFunc
- type ConditionFunc
- type LogCommandStatus
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrTimeOut = errors.New("timed out waiting for the condition")
View Source
var LogStatus = &LogCommandStatus{ IsRunning: false, }
Functions ¶
func PollForever ¶
func PollForever(interval time.Duration, done <-chan string, condition ConditionFunc) (string, error)
Keep polling a condition func until it return a message or an error PollForever always wait interval PollForever will keep polling forever, no timeout
func PollRetry ¶
func PollRetry(retry int, interval time.Duration, condition ConditionFunc) error
PollRetry repeats running condition functions with a backoff until it runs successfully Or it already retried multiple times which is set in config The backoff time will be retry * interval
func PollUntil ¶
func PollUntil(interval time.Duration, done <-chan string, timeout time.Duration, condition ConditionFunc) (string, error)
Keep polling a condition func until timeout or a message/error is returned
func RetryCmdLogs ¶
Retry command forever
Types ¶
type ConditionCHFunc ¶
type ConditionCHFunc func(done chan string)
type ConditionFunc ¶
type LogCommandStatus ¶
Click to show internal directories.
Click to hide internal directories.