add connection info to router

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk 2024-06-06 22:31:52 +00:00
parent c2267d4c03
commit 0bade5317f
5 changed files with 27 additions and 18 deletions

View file

@ -4,14 +4,14 @@ mod unix;
use std::sync::Arc;
use axum::{routing::IntoMakeService, Router};
use axum::Router;
use axum_server::Handle as ServerHandle;
use conduit::{Error, Result, Server};
use tokio::sync::broadcast;
/// Serve clients
pub(super) async fn serve(
server: &Arc<Server>, app: IntoMakeService<Router>, handle: ServerHandle, shutdown: broadcast::Receiver<()>,
server: &Arc<Server>, app: Router, handle: ServerHandle, shutdown: broadcast::Receiver<()>,
) -> Result<(), Error> {
let config = &server.config;
let addrs = config.get_bind_addrs();