Struct SpacedeckExecutor
pub struct SpacedeckExecutor { /* private fields */ }Expand description
Runs each trial as a spacedeck-placed command.
ENV_SPACEDECK_CLI names the spacedeck executable when the default
spacedeck is not on PATH. The constructor also accepts an explicit executable path,
which is useful for controlled deployments and mock executables.
Implementations§
§impl SpacedeckExecutor
impl SpacedeckExecutor
pub fn try_new(
schema: &SpaceSchema,
target: &str,
template: CommandTemplate,
) -> Result<Self>
pub fn try_new( schema: &SpaceSchema, target: &str, template: CommandTemplate, ) -> Result<Self>
Creates an executor for a declared space, spacedeck host selector, and argv template. The target command itself is passed as argv; no shell is introduced by this adapter.
§Errors
Returns Error::InvalidSpace when the target is empty or a command
placeholder is absent from schema.
pub const fn timeout(self, timeout: Duration) -> Self
pub const fn timeout(self, timeout: Duration) -> Self
Applies a remote per-host timeout through spacedeck’s --timeout, in
whole milliseconds rounded up (spacedeck parses integer durations only),
so a nonzero timeout never reaches spacedeck as its “no bound” 0ms.
The spacedeck CLI itself is killed, failing the trial, if it has not answered within this timeout plus a grace of one minute. Without a timeout, or with a zero one (spacedeck’s “no bound”), it is waited for indefinitely.
pub fn pick(self, pick: SpacedeckPick) -> Result<Self>
pub fn pick(self, pick: SpacedeckPick) -> Result<Self>
Runs each trial on one host spacedeck picks from the target set, as
pick constrains it, instead of on every host the target names.
The target stays the candidate set (--on), so a pick from @all
considers every inventory host. spacedeck holds no slot for a run,
so two trials picked at once can land on the same host.
§Errors
Returns Error::InvalidSpace when a window or size is empty or
contains a NUL. spacedeck checks their syntax when a trial runs.
Trait Implementations§
§impl Clone for SpacedeckExecutor
impl Clone for SpacedeckExecutor
§fn clone(&self) -> SpacedeckExecutor
fn clone(&self) -> SpacedeckExecutor
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more