1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
//! Axum + tower-http convenience layer.
//!
//! Wraps an `axum::Router` with a sensible-default middleware stack
//! (tracing, request-id propagation, request timeout), a built-in `/health`
//! endpoint, and SIGINT/SIGTERM-aware graceful shutdown. The underlying
//! `axum`, `tower`, and `tower-http` crates are re-exported at the crate
//! root so consumers don't need to add them as separate dependencies.
//!
//! # Example
//!
//! ```no_run
//! use altair_server::Server;
//! use altair_server::axum::routing::get;
//!
//! # async fn run() -> altair_server::Result<()> {
//! Server::builder()
//! .bind_addr("0.0.0.0:3000")
//! .route("/", get(|| async { "hello" }))
//! .build()
//! .await?
//! .run()
//! .await
//! # }
//! ```
pub use ServerBuilder;
pub use ;
pub use Server;
pub use shutdown_signal;
// Re-exports for one-dep ergonomics
pub use axum;
pub use tower;
pub use tower_http;