pub struct Executor { /* private fields */ }Expand description
Channel-driven executor. One per ceremony run.
Implementations§
Source§impl Executor
impl Executor
Sourcepub fn new(
ceremony: Ceremony,
registry: ActionRegistry,
backend_registry: BackendRegistry,
output_config: OutputConfig,
dry_run: bool,
startup: StartupSnapshot,
) -> Self
pub fn new( ceremony: Ceremony, registry: ActionRegistry, backend_registry: BackendRegistry, output_config: OutputConfig, dry_run: bool, startup: StartupSnapshot, ) -> Self
Build an executor for a single ceremony run.
startup carries the system identity and device environment the CLI
gathered at launch; the executor echoes them to the frontend as UI
signals at ceremony start and does not otherwise inspect them.
Sourcepub fn with_clock(self, clock: Arc<dyn Clock>) -> Self
pub fn with_clock(self, clock: Arc<dyn Clock>) -> Self
Override the run clock. The default is SystemClock; tests inject a
fixed or stepping clock to make recorded event times deterministic.
Sourcepub fn run(
self,
cmd_rx: &Receiver<UiCommand>,
event_tx: &Sender<ExecEvent>,
transcript_sink: Box<dyn TranscriptSink>,
) -> Result<ExecutionSummary, ExecutionError>
pub fn run( self, cmd_rx: &Receiver<UiCommand>, event_tx: &Sender<ExecEvent>, transcript_sink: Box<dyn TranscriptSink>, ) -> Result<ExecutionSummary, ExecutionError>
Drive the ceremony to completion.
Blocking. Intended to be invoked on a dedicated executor thread
spawned by the frontend. The transcript_sink is finalized before
this function returns, and its fingerprint is included in the
returned summary.
§Errors
Returns ExecutionError for any condition that prevents the
ceremony from completing, validation failures, missing actions,
abort, backend errors, or transcript I/O failures.