Skip to main content

serve

Function serve 

Source
pub async fn serve(
    cfg: AppConfig,
    backend: Arc<dyn Backend>,
    label: &str,
) -> Result<()>
Expand description

Bind the HTTP server, register the generic handler set against backend, and run until the process receives SIGINT or SIGTERM.

Shutdown is graceful: on signal the listening socket is closed, existing connections get up to cfg.server.shutdown_timeout_secs seconds to drain in-flight requests, then workers are stopped.

label is the human-readable backend name used in the startup log line (e.g. "DuckDB", "DataFusion").