Documentation ¶
Overview ¶
Package up is used to run a function for some duration. If a new function is added while a previous run is still ongoing, nothing new will be executed.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Func ¶
type Func func() error
Func is used to determine if a target is alive. If so this function must return nil.
type Probe ¶
Probe is used to run a single Func until it returns true (indicating a target is healthy). If an Func is already in progress no new one will be added, i.e. there is always a maximum of 1 checks in flight.
func (*Probe) SetInterval ¶
SetInterval sets the probing interval to be used by upcoming probes initiated with Do.
Click to show internal directories.
Click to hide internal directories.