lifecycle

package
v1.2.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 11, 2026 License: MIT Imports: 1 Imported by: 0

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL