Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var InTestEnvironment = false
Functions ¶
This section is empty.
Types ¶
type BreakPredicate ¶
func IsErr ¶
func IsErr(err error) BreakPredicate
type Loop ¶
type Loop struct {
// contains filtered or unexported fields
}
Loop retries a task function until it succeeded with number of attempts and delay between runs are adjustable.
func NewLoop ¶
NewLoop create Loop with features: - it is "verbose" loop — it prints messages through logboek. - this loop is interruptable by the signal watcher in tomb package.
func NewSilentLoop ¶
NewSilentLoop create Loop with features: - it is "silent" loop — no messages are printed through logboek. - this loop is not interruptable by the signal watcher in tomb package.
func (*Loop) BreakIf ¶
func (l *Loop) BreakIf(pred BreakPredicate) *Loop
func (*Loop) Run ¶
Run retries a task function until it succeeded or break task retries if break predicate returns true
func (*Loop) WithInterruptable ¶
func (*Loop) WithShowError ¶
Click to show internal directories.
Click to hide internal directories.