pub async fn start_http_server(
    host: SocketAddr,
    manager: Arc<Manager<'static>>,
) -> Result<(), ServerError> {
    serve(attach_routes(manager.clone()))
        .try_bind_with_graceful_shutdown(host, async {
            ctrl_c().await.ok();
        })
        .map_err(ServerError::Internal)?
        .1
        .await;

    manager.shutdown().await;

    Ok(())
}
/// Start HTTP server with shared manager
///
/// Server starts graceful shutdown process on CTRL-C signal
Start HTTP server with shared manager
Server starts graceful shutdown process on CTRL-C signal
Start HTTP server with shared manager Server starts graceful shutdown process on CTRL - C signal
pub async fn start_http_server(
    host: SocketAddr,
    manager: Arc<Manager<'static>>,
) -> Result<(), ServerError> {
    serve(attach_routes(manager.clone()))
        .try_bind_with_graceful_shutdown(host, async {
            ctrl_c().await.ok();
        })
        .map_err(ServerError::Internal)?
        .1
        .await;
    manager.shutdown().await;
    Ok(())
}
pub async fn start_http_server ( host : SocketAddr , manager : Arc < Manager < ' static > > , ) -> Result < ( ) , ServerError > { serve ( attach_routes ( manager . clone ( ) ) ) . try_bind_with_graceful_shutdown ( host , async { ctrl_c ( ) . await . ok ( ) ; } ) . map_err ( ServerError :: Internal ) ? . 1 . await ; manager . shutdown ( ) . await ; Ok ( ( ) ) }
Start HTTP server with shared manager
Server starts graceful shutdown process on CTRL-C signal
Start HTTP server with shared manager Server starts graceful shutdown process on CTRL - C signal
host
SocketAddr
manager
Arc<Manager<'static>>
host
SocketAddr
manager
Arc<Manager<'static>>