Skip to main content

Module bootstrap

Module bootstrap 

Source
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:

  1. Validates configuration values
  2. Constructs storage and engine dependencies
  3. Initializes metrics registry
  4. 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 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§

BootstrapState
Bootstrap state returned after successful bootstrap.
ReadyStatus
Ready status representation.
RouterConfig
Router configuration for routing assembly.

Enums§

BootstrapError
Bootstrap error types.

Functions§

bootstrap
Bootstrap entry point.