pub struct SshExecutor { /* private fields */ }Expand description
SSH-based remote executor.
Implementations§
Source§impl SshExecutor
impl SshExecutor
Sourcepub fn add_machine(&mut self, machine_id: String, config: SshConfig)
pub fn add_machine(&mut self, machine_id: String, config: SshConfig)
Register a machine with its SSH configuration.
Sourcepub fn remove_machine(&mut self, machine_id: &str) -> Option<SshConfig>
pub fn remove_machine(&mut self, machine_id: &str) -> Option<SshConfig>
Remove a machine configuration.
Sourcepub fn get_config(&self, machine_id: &str) -> Option<&SshConfig>
pub fn get_config(&self, machine_id: &str) -> Option<&SshConfig>
Get the SSH config for a machine.
Sourcepub fn machine_ids(&self) -> Vec<String>
pub fn machine_ids(&self) -> Vec<String>
List all configured machine IDs.
Sourcepub fn build_command(
&self,
machine_id: &str,
command: &str,
working_dir: Option<&str>,
) -> Result<String>
pub fn build_command( &self, machine_id: &str, command: &str, working_dir: Option<&str>, ) -> Result<String>
Build the full command string that would be executed for a given machine.
Sourcepub fn parse_output(
machine_id: &str,
stdout: &str,
stderr: &str,
exit_code: i32,
duration_ms: u64,
) -> RemoteOutput
pub fn parse_output( machine_id: &str, stdout: &str, stderr: &str, exit_code: i32, duration_ms: u64, ) -> RemoteOutput
Parse SSH command output into a RemoteOutput struct.
Trait Implementations§
Source§impl Debug for SshExecutor
impl Debug for SshExecutor
Source§impl Default for SshExecutor
impl Default for SshExecutor
Source§impl RemoteExecutor for SshExecutor
impl RemoteExecutor for SshExecutor
Auto Trait Implementations§
impl Freeze for SshExecutor
impl RefUnwindSafe for SshExecutor
impl Send for SshExecutor
impl Sync for SshExecutor
impl Unpin for SshExecutor
impl UnsafeUnpin for SshExecutor
impl UnwindSafe for SshExecutor
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more