Function axum_restful::utils::server::shutdown_signal
source · pub async fn shutdown_signal()Expand description
copy from axum/examples/graceful-shutdown/src/main.rs receive Ctrl + C and graceful shutdown server
graceful shutdown Example
use axum::{Router, routing::get};
use axum_restful::utils::shutdown_signal;
// let app = Router::new().route("/", get(|| async {"hello"}));
//axum::Server::bind(&"".parse().unwrap())
// .serve(app.into_make_service())
// .with_graceful_shutdown(shutdown_signal())
// .await
// .unwrap()