Skip to content

Function: createShutdownSequence()

Makaio Framework


Makaio Framework / kernel / 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).

readonly () => void | Promise<void>[]

Cleanup functions in shutdown order (typically reverse-startup).

An async function that executes all steps once.

() => Promise<void>