liquidrazor/kernel-state-events provides the concrete immutable implementations for the canonical kernel lifecycle only.
It does not define the event contracts it implements. Those remain owned by liquidrazor/event-manager.
The lifecycle represented by this package is:
Booting -> Booted -> Compiling -> Compiled -> ContainerLoading -> ContainerLoaded -> Warming -> Warmed -> Ready -> ShuttingDown -> Shutdown
The separation between compile, container load, and warm is intentional:
- compile builds immutable structural artifacts
- container load materializes those artifacts into the runtime container
- warm prepares parent-safe readonly runtime state
Every concrete event class is bound to exactly one KernelState enum case.
| Event class | State enum case | State value |
|---|---|---|
KernelBootingEvent |
KernelState::Booting |
booting |
KernelBootedEvent |
KernelState::Booted |
booted |
KernelCompilingEvent |
KernelState::Compiling |
compiling |
KernelCompiledEvent |
KernelState::Compiled |
compiled |
KernelContainerLoadingEvent |
KernelState::ContainerLoading |
container_loading |
KernelContainerLoadedEvent |
KernelState::ContainerLoaded |
container_loaded |
KernelWarmingEvent |
KernelState::Warming |
warming |
KernelWarmedEvent |
KernelState::Warmed |
warmed |
KernelReadyEvent |
KernelState::Ready |
ready |
KernelShuttingDownEvent |
KernelState::ShuttingDown |
shutting_down |
KernelShutdownEvent |
KernelState::Shutdown |
shutdown |
Structural kernel startup and completion of initial bootstrap work.
Creation and completion of immutable framework compilation artifacts.
Materialization of compiled artifacts into the runtime container. This is distinct from compilation itself.
Parent-safe warmup and completion of readonly preparation work.
The kernel is fully initialized and ready for parent-kernel responsibilities.
Orderly kernel teardown and completion of lifecycle closure.
All concrete events in this package are immutable and share the same constructor shape:
new SomeKernelEvent(new KernelIdentity('kernel.main'))All concrete events expose:
kernelIdentity(): KernelIdentitystate(): KernelState
The underlying contract implemented by these classes is LiquidRazor\EventManager\Contracts\KernelStateEventInterface, imported from liquidrazor/event-manager.
KernelIdentity is a readonly value object with one public property:
identifier
Its constructor trims the incoming string and rejects empty identifiers.
KernelState is a backed enum containing one case for each canonical lifecycle meaning:
BootingBootedCompilingCompiledContainerLoadingContainerLoadedWarmingWarmedReadyShuttingDownShutdown
This package does not include:
- local event contracts
- process or runtime event classes
- request or response events
- listener registration
- event dispatching