build_router

Function build_router 

Source
pub fn build_router(state: Arc<ServerState>) -> Router
Expand description

Build the axum router with all API endpoints and OpenAPI doc routes.

The single global request_timeout is applied to every route as an outer TimeoutLayer. POST /power now returns immediately with a PCS transition id (the polling loop runs CLI-side), so it fits well under the default timeout — no per-route override is needed.