Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AwaitCondition ¶
AwaitCondition waits until a given condition is satisfied or times out
Types ¶
type RunLifecycle ¶
RunLifecycle manages the start/stop lifecycle for a runnable implementation
func NewRunLifecycle ¶
func NewRunLifecycle(name string) *RunLifecycle
NewRunLifecycle returns a lifecycle object that can be used by a Runnable implementation to make sure the start/stop operations are idempotent
func (*RunLifecycle) Start ¶
func (r *RunLifecycle) Start(action func() error) error
Start executes the given action if and on if lifecycle state is previously not started or stopped
func (*RunLifecycle) Status ¶
func (r *RunLifecycle) Status() (bool, bool)
Status returns the status of this lifecycle as a pair of booleans (started, stopped).
func (*RunLifecycle) Stop ¶
func (r *RunLifecycle) Stop(action func())
Stop stops the given action if and only if lifecycle state is previously started
Click to show internal directories.
Click to hide internal directories.