From 620cf8fa33835c1ce1e56b1028ff6e2a6fbe0f39 Mon Sep 17 00:00:00 2001 From: Benedikt Peetz Date: Thu, 9 Jul 2026 22:00:59 +0200 Subject: chore: Add more things --- crates/server/src/lib.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'crates/server/src/lib.rs') diff --git a/crates/server/src/lib.rs b/crates/server/src/lib.rs index a4b10acf..726afeea 100644 --- a/crates/server/src/lib.rs +++ b/crates/server/src/lib.rs @@ -5,14 +5,14 @@ use axum::{Router, serve}; use database::db::ServerPostgres; use eyre::{Context, Result}; -pub(crate) mod database; +pub mod database; mod handlers; mod metrics; mod router; -pub(crate) use settings::Settings; +pub use settings::Settings; -pub(crate) mod settings; +pub mod settings; use tokio::net::TcpListener; use tokio::signal; @@ -31,7 +31,7 @@ async fn shutdown_signal() { eprintln!("Shutting down gracefully..."); } -pub(crate) async fn launch(settings: Settings, addr: SocketAddr) -> Result<()> { +pub async fn launch(settings: Settings, addr: SocketAddr) -> Result<()> { launch_with_tcp_listener( settings, TcpListener::bind(addr) @@ -42,7 +42,7 @@ pub(crate) async fn launch(settings: Settings, addr: SocketAddr) -> Result<()> { .await } -pub(crate) async fn launch_with_tcp_listener( +pub async fn launch_with_tcp_listener( settings: Settings, listener: TcpListener, shutdown: impl Future + Send + 'static, @@ -58,7 +58,7 @@ pub(crate) async fn launch_with_tcp_listener( // The separate listener means it's much easier to ensure metrics are not accidentally exposed to // the public. -pub(crate) async fn launch_metrics_server(host: String, port: u16) -> Result<()> { +pub async fn launch_metrics_server(host: String, port: u16) -> Result<()> { let listener = TcpListener::bind((host, port)) .await .context("failed to bind metrics tcp")?; -- cgit v1.3.1