Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LifecycleManager ¶
type LifecycleManager struct {
// contains filtered or unexported fields
}
LifecycleManager is a support struct for implementing module.ReadyDoneAware
func NewLifecycleManager ¶
func NewLifecycleManager() *LifecycleManager
func (*LifecycleManager) OnStart ¶
func (lm *LifecycleManager) OnStart(startupFns ...func())
OnStart will commence startup of the LifecycleManager. If OnStop has already been called before the first call to OnStart, startup will not be performed. After the first call, subsequent calls to OnStart do nothing.
func (*LifecycleManager) OnStop ¶
func (lm *LifecycleManager) OnStop(shutdownFns ...func())
OnStop will commence shutdown of the LifecycleManager. If the LifecycleManager is still starting up, we will wait for startup to complete before shutting down. After the first call, subsequent calls to OnStop do nothing.
func (*LifecycleManager) ShutdownSignal ¶
func (lm *LifecycleManager) ShutdownSignal() <-chan struct{}
ShutdownSignal returns a channel that is closed when shutdown has commenced.
func (*LifecycleManager) Started ¶
func (lm *LifecycleManager) Started() <-chan struct{}
Started returns a channel that is closed when startup has completed. If the LifecycleManager is stopped before OnStart() is ever called, the returned channel will never be closed.
func (*LifecycleManager) Stopped ¶
func (lm *LifecycleManager) Stopped() <-chan struct{}
Stopped returns a channel that is closed when shutdown has completed