Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LoopRunner ¶
type LoopRunner struct {
// contains filtered or unexported fields
}
LoopRunner provides a reusable start/stop lifecycle for background loops. It guarantees idempotent start/stop and waits for loop exit on stop.
func NewLoopRunner ¶
func NewLoopRunner() *LoopRunner
func (*LoopRunner) Running ¶
func (r *LoopRunner) Running() bool
func (*LoopRunner) Start ¶
func (r *LoopRunner) Start(loop func(stop <-chan struct{})) bool
func (*LoopRunner) Stop ¶
func (r *LoopRunner) Stop() bool
Click to show internal directories.
Click to hide internal directories.