Skip to main content
Shared In your resource, a mirror kept in sync by lifecycle events. States, in order: Booting, Configured, Initializing, Starting, Ready, Stopping, Stopped. States only move forward and MAY be skipped.

GetState

UgLifecycleState
The current state, such as 'Ready'.

IsReady

HasReached

false for states not reached yet and for skipped states.

On

UgLifecycleState
required
Raises for unknown states.
fun()
required
Runs when ug-core reaches state.
Sticky: runs immediately when the state was already reached. Never runs when the state was skipped. A failing handler is logged and does not stop others.

Await

MUST run in a thread.
UgLifecycleState
required
integer
Milliseconds. Waits forever when nil.
boolean
false on timeout or when the state was skipped.