Skip to main content

serve_api

Function serve_api 

Source
pub async fn serve_api(
    db: Database,
    __arg1: (Auth, ApiTimings, NodeView),
    __arg2: (TcpListener, Option<TcpListener>),
    tls: Option<Tls>,
    ui: Option<LocalUi>,
    observed: Observed<'_, ApiMetrics>,
    stop: Receiver<u32>,
) -> Result<(), AppError>
Expand description

Serves the REST API on listener until stop, reading task logs from workers (over mTLS with tls), showing this webserver as node (GET /api/v1/deployment); with ui, the web UI too, at /, calling this API in process.

ยงErrors

AppError::BadArgument if the HTTP server fails.