Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Runner ¶
type Runner struct { // channel to control stop status, stop it by calling Stop(). C chan struct{} // contains filtered or unexported fields }
Runner the runner status struct.
func NewChild ¶
func NewChild(stop chan struct{}) *Runner
NewChild create a new Runner as child of the exists chan, when which is closed the child will be stopped too.
func (*Runner) Loop ¶
Loop run task util the stopper is stopped. Note, there is not an interval between the executions of two tasks.
func (*Runner) NewChild ¶
NewChild create a new Runner as child of the exists one, when which is stopped the child will be stopped too.
Click to show internal directories.
Click to hide internal directories.