Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Create = newBase // allow to override
Functions ¶
func Stop ¶
func Stop(r Runner)
Stop a runner, in most scenario, Stop is a notification action, used to notify the Runner to stop.
func StopAndWait ¶ added in v0.9.17
func StopAndWait(r Runner)
StopAndWait notify Runner to stop, and notify the Runner's children in reverse order to stop and wait for the children to finish.
Types ¶
type Runner ¶
type Runner interface { kvs.NoErrKVS log.Logger Init() error Start() error Stop() error Name() string SetName(string) Ctx() context.Context SetCtx(context.Context) Cancel() Inherit(Runner) Started() <-chan struct{} Stopping() <-chan struct{} StopDone() <-chan struct{} Done() <-chan struct{} GetChild(string) Runner Children() []Runner AppendRunner(Runner) bool WaitChildrenDone() SetParent(Runner) Parent() Runner OnChildDone(Runner) error AppendError(err ...error) Err() error SelfErr() error ChildrenErr() error WithLoggerFrom(r Runner, kvs ...any) // contains filtered or unexported methods }
Click to show internal directories.
Click to hide internal directories.