rs-zero 0.1.1

Rust-first microservice framework inspired by go-zero engineering practices
Documentation
1
2
3
4
5
6
7
8
9
/// Waits until the process receives Ctrl-C.
///
/// Services can pass this future to server helpers that support graceful
/// shutdown.
pub async fn shutdown_signal() {
    if let Err(error) = tokio::signal::ctrl_c().await {
        tracing::warn!(%error, "failed to listen for ctrl-c");
    }
}