Expand description
Daemon bootstrap module.
This module provides the bootstrap entry point for the ActionQueue daemon. Bootstrap assembles runtime dependencies from configuration and prepares the HTTP introspection surface without starting background loops or binding network sockets.
§Overview
The bootstrap process:
- Validates configuration values
- Constructs storage and engine dependencies
- Initializes metrics registry
- Sets up router wiring entry point with control feature flag gating
§Invariant boundaries
Bootstrap must not introduce mutation authority bypass or direct state
mutation. All control routes must route through validated mutation
authority defined in actionqueue_storage::mutation::authority.
§Bootstrap output
On success, bootstrap returns a BootstrapState that contains:
- The validated configuration
- Metrics registry handle
- A concrete HTTP router built with
crate::http::build_router() - Shared router state (Arc-wrapped
crate::http::RouterStateInner)
The router and router state are constructed deterministically from the bootstrap output (config control flag, projection state, and readiness). No sockets are bound and no background tasks are started.
§Example
use actionqueue_daemon::bootstrap::{bootstrap, BootstrapState};
use actionqueue_daemon::config::DaemonConfig;
let config = DaemonConfig::default();
let state = bootstrap(config).expect("bootstrap should succeed");
// Access the router and state directly from bootstrap output
let router = state.http_router();
let router_state = state.router_state();
// Use router to start HTTP server at a higher level
// (HTTP server startup is not part of bootstrap)Structs§
- Bootstrap
State - Bootstrap state returned after successful bootstrap.
- Ready
Status - Ready status representation.
- Router
Config - Router configuration for routing assembly.
Enums§
- Bootstrap
Error - Bootstrap error types.
Functions§
- bootstrap
- Bootstrap entry point.