Documentation
¶
Overview ¶
Package repeater call fun till it returns no error, up to repeat some number of iterations and delays defined by strategy. Repeats number and delays defined by strategy.Interface. Terminates immediately on err from provided, optional list of critical errors
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Repeater ¶
type Repeater struct {
Strategy
}
Repeater is the main object, should be made by New or NewDefault, embeds strategy
func New ¶
New repeater with a given strategy. If strategy=nil initializes with FixedDelay 5sec, 10 times.
func NewDefault ¶
NewDefault makes repeater with FixedDelay strategy
Click to show internal directories.
Click to hide internal directories.