pub struct OpenSshDriver { /* private fields */ }Expand description
Pooled strict OpenSSH command driver.
Implementations§
Source§impl OpenSshDriver
impl OpenSshDriver
Sourcepub fn new(connector: OpenSshConnector) -> Self
pub fn new(connector: OpenSshConnector) -> Self
Creates a driver with an empty revision-aware connection pool.
Sourcepub async fn invalidate_host(&self, host: &HostId) -> FleetResult<usize>
pub async fn invalidate_host(&self, host: &HostId) -> FleetResult<usize>
Invalidates every cached revision for one host.
Sourcepub async fn retain_snapshot(
&self,
snapshot: &TopologySnapshot,
) -> FleetResult<usize>
pub async fn retain_snapshot( &self, snapshot: &TopologySnapshot, ) -> FleetResult<usize>
Evicts cached sessions absent from the supplied snapshot.
Sourcepub async fn shutdown(&self) -> FleetResult<usize>
pub async fn shutdown(&self) -> FleetResult<usize>
Closes all cached sessions.
Sourcepub async fn connection(
&self,
host: &HostRecord,
cancellation: &CancellationToken,
) -> FleetResult<Arc<OpenSshConnection>>
pub async fn connection( &self, host: &HostRecord, cancellation: &CancellationToken, ) -> FleetResult<Arc<OpenSshConnection>>
Returns the exact pooled connection for forwarding adapters.
Trait Implementations§
Source§impl CommandExecutor for OpenSshDriver
impl CommandExecutor for OpenSshDriver
Source§fn execute<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
host: &'life1 HostRecord,
request: &'life2 CommandRequest,
cancellation: &'life3 CancellationToken,
) -> Pin<Box<dyn Future<Output = FleetResult<CommandOutput>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn execute<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
host: &'life1 HostRecord,
request: &'life2 CommandRequest,
cancellation: &'life3 CancellationToken,
) -> Pin<Box<dyn Future<Output = FleetResult<CommandOutput>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Executes a validated command request on one exact host revision.
Auto Trait Implementations§
impl !Freeze for OpenSshDriver
impl !RefUnwindSafe for OpenSshDriver
impl Send for OpenSshDriver
impl Sync for OpenSshDriver
impl Unpin for OpenSshDriver
impl UnsafeUnpin for OpenSshDriver
impl !UnwindSafe for OpenSshDriver
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