diff options
| author | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2026-07-09 22:00:59 +0200 |
|---|---|---|
| committer | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2026-07-09 22:00:59 +0200 |
| commit | 620cf8fa33835c1ce1e56b1028ff6e2a6fbe0f39 (patch) | |
| tree | e97e54ff112c8e3fa9f88335bfd1275420a4d69f /crates/server/src/lib.rs | |
| parent | chore: Separate daemon, client, server, and lib into crates (diff) | |
| download | atuin-620cf8fa33835c1ce1e56b1028ff6e2a6fbe0f39.zip | |
chore: Add more things
Diffstat (limited to '')
| -rw-r--r-- | crates/server/src/lib.rs | 12 |
1 files changed, 6 insertions, 6 deletions
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<Output = ()> + 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")?; |
