Function: createShutdownSequence()
Makaio Framework / kernel / createShutdownSequence
Function: createShutdownSequence()
Section titled “Function: createShutdownSequence()”createShutdownSequence(
steps): () =>Promise<void>
Defined in: ../../../packages/kernel/src/shutdown.ts:10
Create an ordered, idempotent shutdown sequence.
Steps run in the order provided. Errors in individual steps are logged but do not prevent subsequent steps from running. Concurrent calls to the returned function share the same promise (idempotent).
Parameters
Section titled “Parameters”readonly () => void | Promise<void>[]
Cleanup functions in shutdown order (typically reverse-startup).
Returns
Section titled “Returns”An async function that executes all steps once.
() => Promise<void>