Skip to main content

Module server

Module server 

Source
Expand description

HTTP server wiring — composes the workflow API + dashboard + auth routers into one axum Router. URL surface:

  • /auth/* OIDC spec (discovery, authorize, token, …)
  • /api/v1/engine/core/* engine-core admin
  • /api/v1/engine/workflow/* workflow API (auth-gated below)
  • /api/v1/engine/auth/* engine-internal auth + admin
  • /healthz redirect to /api/v1/engine/core/health

Functions§

bind_and_serve
Bind a TCP listener on bind_addr and serve a pre-built axum::Router.
build_app
Compose the full axum::Router for the engine.
build_workflow_ctx
Start a WorkflowCtx around the given store. Authentication + authorization are no longer the workflow’s concern — the engine wraps the workflow router with a gate middleware (build_app) that handles all of that.
build_workflow_ctx_with_bus
Like build_workflow_ctx but also wires the engine-wide event bus into the workflow context so SSE + the dispatch-wakeup loop see state transitions.
serve
Bind a TCP listener on bind_addr and serve the composed app.