Skip to main content

Module shutdown

Module shutdown 

Source
Expand description

Termination signal helpers.

This module only waits for process termination signals. Product crates remain responsible for recording audit events, stopping background tasks, flushing buffers, and closing database or network handles in their preferred order.

Structs§

ShutdownCoordinator
Ordered shutdown phase coordinator.
ShutdownPhaseReport
Report for one executed shutdown phase.
ShutdownReport
Aggregate report for a shutdown run.

Enums§

RuntimeSignalError
Errors returned while installing signal listeners.
ShutdownPhaseStatus
Final status for one shutdown phase.
TerminationSignal
Termination signal observed by the runtime.

Functions§

log_shutdown_report
Logs the aggregate result of a shutdown run.
spawn_termination_signal_handler
Spawns a task that waits for a termination signal, cancels shutdown_token, and then runs on_signal.
wait_for_termination_signal
Waits until the process receives a termination signal.