Expand description
bye: graceful shutdown and USR1 zero-downtime upgrade helpers.
Byemanages aCancellationTokenbroadcast + aTaskTracker.Bye::new_with_signals()listens for TERM/INT/QUIT -> drain, USR1 -> fork+exec self and wait for childready().ready()tells the parent (or your process manager) that the service is ready.systemd_tcp_listener(port)uses socket activation if available.
Structs§
- Bye
- Main struct to manage graceful shutdown and task tracking Cloning this struct allows sharing the shutdown signal and task tracking capabilities across different parts of the application. When a shutdown is initiated, all tracked tasks will be awaited before the application fully exits.
Functions§
- ready
- Notifies the system that the service is ready.
- systemd_
ports - systemd_
tcp_ listener - Creates a TCP listener that uses systemd socket activation if available.
- try_
pid_ file