Skip to main content

Module bootstrap

Module bootstrap 

Source
Expand description

Server-startup orchestration: routing, workspace budget, readiness probe, and the background probe task that fits the cost model on first start.

Submodules:

  • router: axum Router construction + tracing/request-id layers.
  • budget: pure workspace-budget arithmetic (compute_workspace_budget).
  • readiness: the foreground readiness probe (run_readiness_probe, run_readiness_checks_and_open).
  • probe_task: the background probe task (spawn_probe_task) used when the cost model has not been overridden and no EFS cache hit was found.

Modulesยง

budget ๐Ÿ”’
Pure workspace-budget arithmetic shared between the readiness probe and the unit tests.
probe_task ๐Ÿ”’
Background probe task spawned when the cost model has not been overridden and the EFS cache is empty (or disabled).
readiness ๐Ÿ”’
Foreground readiness probe.
router ๐Ÿ”’
Axum router construction with the request-id, tracing, and body-limit layers attached.

Functionsยง

build_router
Builds the Axum [Router] with all embedding, health, and fleet-discovery routes, a 2 MiB body limit, request-id propagation, and structured tracing.
run_readiness_probe
Runs after all workers finish loading their model instances.