pub struct Orchestrator {
pub manifest: Option<Manifest>,
/* private fields */
}Expand description
Top-level orchestrator. Construct via Orchestrator::builder.
Fields§
§manifest: Option<Manifest>Optional manifest snapshot — kept for downstream consumers (CLI, telemetry).
Implementations§
Source§impl Orchestrator
impl Orchestrator
Sourcepub fn builder() -> Builder
pub fn builder() -> Builder
Start a fresh Builder.
The default max_parallelism is num_cpus::get(). The default
base_ctx uses a fresh CancellationToken, current_dir() for
workdir, and an empty env map. SDK/library consumers must
explicitly call Builder::base_ctx with an allowlisted env (the
CLI does this via filtered_env()) — defaulting to a snapshot of
the parent process env would leak secrets like GITHUB_TOKEN /
AWS_SECRET_ACCESS_KEY through any future tracing::debug!(?ctx)
or panic dump (CWE-200). This is the engine-layer counterpart to
the CLI’s existing env allowlist.
Sourcepub async fn compute_plan(&self) -> Result<Plan, PlanError>
pub async fn compute_plan(&self) -> Result<Plan, PlanError>
Compute the Plan for the registered actions against the current
cache state. Pure: no side effects.
§Errors
Forwarded from Plan::compute.
Sourcepub async fn execute_plan(
&mut self,
plan: &Plan,
mode: ExecMode,
) -> Result<Vec<BuildEvent>, ExecError>
pub async fn execute_plan( &mut self, plan: &Plan, mode: ExecMode, ) -> Result<Vec<BuildEvent>, ExecError>
Execute every stale action in the plan, layer by layer.
Returns the chronological list of BuildEvents recorded across all
executed layers. Cache writes happen after each layer settles, so
a crash mid-layer leaves the prior layers persisted.
§Errors
ExecError::LayerFailedwhen any action in a layer errors out (further layers are not started, regardless ofmode).ExecError::Cachewhen persisting an event to the cache fails.