servlet 1.1.0

A small application runtime with an explicit operational contract
Documentation
//! A small application runtime with supervised workers and coordinated shutdown.
//!
//! Build routes with [`App`], use [`App::start`] inside an existing Tokio runtime,
//! or combine [`main`] and [`App::run`] for process-owned signal handling.

/// A supplied state is required before startup.
///
/// ```compile_fail
/// use servlet::App;
/// async fn missing_state() {
///     App::<String>::new("missing").start().await;
/// }
/// ```
///
/// ```no_run
/// #[servlet::main]
/// async fn main() -> servlet::Result<()> {
///     servlet::App::new("hello").get("/", || async { "Hello, world!" }).run().await
/// }
/// ```
mod app;
mod config;
pub mod health;
mod lifecycle;
pub mod metrics;
pub mod process;
#[path = "error/mod.rs"]
mod runtime_error;
pub mod settings;
pub mod setup;
pub mod task;
pub mod telemetry;
pub mod web;

pub use app::{App, Components, Role};
pub use config::{AppConfig, ConfigError};
pub use lifecycle::{AppHandle, Phase, Running};
pub use runtime_error::{Error, Failure, FailureKind, Result};
pub use serde;
pub use servlet_macros::{instrument, main};
pub use tokio::{fs, io, net, sync, time};
pub use tracing::{
    Instrument, Level, Span, debug, debug_span, error, error_span, info, info_span, span, trace,
    trace_span, warn, warn_span,
};

/// Upstream types retain their identity and are part of Servlet's public API.
pub mod ecosystem {
    pub use axum;
    pub use tokio;
    pub use tower;
    pub use tracing;
    pub use zlid;
    #[cfg(feature = "otel")]
    pub use {opentelemetry, opentelemetry_sdk, tracing_opentelemetry, tracing_subscriber};
    #[cfg(feature = "recourse")]
    pub use {recourse, recourse_axum};
}

#[cfg(feature = "postgres")]
pub mod sql;

#[cfg(feature = "client")]
pub mod client;