pub struct ExecutionPlan {
pub pre_commands: Vec<PlannedCommand>,
pub commands: Vec<PlannedCommand>,
pub post_commands: Vec<PlannedCommand>,
pub parallel: Option<bool>,
pub max_parallel: Option<usize>,
pub spawn_stagger_ms: Option<u64>,
}Expand description
An execution plan returned by a plugin, containing commands for the host to execute.
Fields§
§pre_commands: Vec<PlannedCommand>Commands to run BEFORE the main parallel execution (sequential, must complete). Use for setup tasks like establishing SSH ControlMaster connections.
commands: Vec<PlannedCommand>Main commands to execute (may run in parallel based on parallel flag)
post_commands: Vec<PlannedCommand>Commands to run AFTER main execution completes (sequential). Use for cleanup tasks.
parallel: Option<bool>Whether to run main commands in parallel (overrides CLI –parallel if set)
max_parallel: Option<usize>Maximum number of commands to run in parallel (pool size limit). Use to limit concurrency for operations with shared resources (e.g., SSH ControlMaster has a default session limit of 10). When set, loop_lib will run at most this many commands simultaneously.
spawn_stagger_ms: Option<u64>Milliseconds to wait between spawning parallel commands. Use to spread out initial connection bursts and prevent SSH ControlMaster socket saturation. A value of 25ms with 13 repos spreads spawns over ~325ms.
Trait Implementations§
Source§impl Clone for ExecutionPlan
impl Clone for ExecutionPlan
Source§fn clone(&self) -> ExecutionPlan
fn clone(&self) -> ExecutionPlan
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more