pub struct SSHRunner {
pub host: String,
pub user: Option<String>,
pub jump_host: Option<String>,
pub jump_user: Option<String>,
pub ssh_port: Option<u16>,
pub ssh_key_path: Option<String>,
pub ssh_config_path: Option<String>,
pub timeout: u64,
pub connect_timeout: u64,
pub verbose: bool,
}Fields§
§host: String§user: Option<String>§jump_host: Option<String>§jump_user: Option<String>§ssh_port: Option<u16>§ssh_key_path: Option<String>§ssh_config_path: Option<String>§timeout: u64§connect_timeout: u64§verbose: boolImplementations§
Source§impl SSHRunner
impl SSHRunner
pub fn new(host: &str) -> Self
pub fn with_jump(self, jump: &str) -> Self
pub fn with_user(self, user: &str) -> Self
pub fn test_connection(&self, timeout: Option<u64>) -> Result<bool>
pub fn run_command( &self, command: &str, timeout: Option<u64>, ) -> Result<RemoteTaskResult>
pub fn upload(&self, local: &str, remote: &str) -> Result<()>
pub fn upload_text(&self, text: &str, remote: &str) -> Result<()>
pub fn download(&self, remote: &str, local: &str) -> Result<()>
pub fn detect_python(&self) -> Result<Option<String>>
pub fn detect_arch(&self) -> Result<String>
pub fn remote_target(&self) -> String
Auto Trait Implementations§
impl Freeze for SSHRunner
impl RefUnwindSafe for SSHRunner
impl Send for SSHRunner
impl Sync for SSHRunner
impl Unpin for SSHRunner
impl UnsafeUnpin for SSHRunner
impl UnwindSafe for SSHRunner
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more