#shutdown-signal #axum #shutdown #graceful-shutdown #dead #tokio

vss

A dead simple library to allow for easily reused shutdown signal handling

2 releases

0.1.1 Nov 26, 2024
0.1.0 Dec 29, 2023

#478 in Asynchronous

Download history 133/week @ 2024-11-13 163/week @ 2024-11-20 325/week @ 2024-11-27 71/week @ 2024-12-04 87/week @ 2024-12-11 57/week @ 2024-12-18 78/week @ 2024-12-25 316/week @ 2025-01-01 89/week @ 2025-01-08 125/week @ 2025-01-15 152/week @ 2025-01-22 186/week @ 2025-01-29 98/week @ 2025-02-05 203/week @ 2025-02-12 89/week @ 2025-02-19 202/week @ 2025-02-26

608 downloads per month
Used in tunnelbana

MIT/Apache

4KB

vss

valkyrie_pilot's shutdown_signal

This is a very simple crate, made to be used with axum's graceful_shutdown method, like so:

#[tokio::main]
async fn main() {
axum::serve(tcp, app)
    .with_graceful_shutdown(vss::shutdown_signal())
    .await
    .unwrap();
}

lib.rs:

valkyrie_pilot's shutdown signal

This crate provides a simple, cross-platform Tokio shutdown waiter.

Made because docker sends sigquit, but tokio's ctrl_c does not respond to sigquit, leading to the container being killed 10s later.

Dependencies

~3–11MB
~107K SLoC