Skip to content

start

Enums

  • StartMode - Mode in which [start] manages the stack after readiness.

Functions

  • spawn_stack - Spawn the authority and sidecar stack and wait for readiness.
  • start - Start the authority and sidecar stack.

Enum

Mode in which [start] manages the stack after readiness.

Variants:

  • Foreground - Supervise in the calling process until interruption or component exit.
  • Detached - Launch the hidden Firma supervisor and return after handoff.

Traits: Eq, Copy

Trait Implementations:

  • Debug
    • fn fmt(self: &Self, f: & mut $crate::fmt::Formatter) -> $crate::fmt::Result
  • PartialEq
    • fn eq(self: &Self, other: &StartMode) -> bool
  • Clone
    • fn clone(self: &Self) -> StartMode

Function

Spawn the authority and sidecar stack and wait for readiness.

Defers to [spawn_stack_from_plan], resolving the firma plan from cfg only after the stack lock is claimed so an already-running stack is reported before config parsing. The caller must choose one of the ownership transitions documented by [RunningStack]: orderly shutdown, explicit detachment, or the fail-closed Drop backstop.

Used by firma-demo-tui.

Returns config, state-directory, lock, spawn, or readiness errors.

fn spawn_stack(cfg: &crate::config::StackConfig, state_dir: &std::path::Path) -> Result<firma_process_orchestrator::RunningStack, crate::error::StackError>

Function

Start the authority and sidecar stack.

Resolves the Firma plan from cfg only after the stack lock is claimed (foreground) or in the detached supervisor child.

Returns config, state directory, spawn, readiness, or detach errors.

fn start(cfg: &crate::config::StackConfig, state_dir: &std::path::Path, mode: StartMode) -> Result<firma_process_orchestrator::StackHandle, crate::error::StackError>