pub enum Plan {
Empty,
Execute {
node: NodeId,
from: Vec<NodeId>,
},
Sequence(Vec<Plan>),
Wave(Vec<Plan>),
Remote {
host: Host,
inner: Box<Plan>,
},
}Expand description
How a graph is walked.
No #[non_exhaustive]: whoever executes has to decide for each variant.
Variants§
Empty
Nothing to do.
Execute
Advance one node until it finishes.
Fields
Sequence(Vec<Plan>)
One after another, in topological order. Each reads what it needs from what has already been produced.
Wave(Vec<Plan>)
Branches launched at the same time, one per connected component, so they are disjoint. Each is a whole plan, so a branch runs start to finish on one thread.
Remote
This whole slice executes elsewhere. A complete plan and not a step, so a chain of five nodes on the same host is sent once.
Implementations§
Source§impl Plan
impl Plan
Sourcepub fn steps(&self) -> impl Iterator<Item = Step<'_>>
pub fn steps(&self) -> impl Iterator<Item = Step<'_>>
Every step, in declaration order, wherever it runs: a
Remote is entered, because what a plan does does not
depend on where.
Sourcepub fn destinations(&self) -> impl Iterator<Item = Destination<'_>>
pub fn destinations(&self) -> impl Iterator<Item = Destination<'_>>
What decides where each part of this plan runs, in declaration order.
Differs from steps in one line: a
Remote is not entered, which is what makes
distribute idempotent.