pub struct RemoteDaemons { /* private fields */ }Implementations§
Source§impl RemoteDaemons
impl RemoteDaemons
pub fn new( configs: Vec<RemoteConfig>, broadcast_clients: BroadcastClients, ) -> Self
Sourcepub fn all_remote_sessions(&self) -> HashMap<ThreadRef, SessionInfo>
pub fn all_remote_sessions(&self) -> HashMap<ThreadRef, SessionInfo>
Collect all remote sessions with prefixed IDs (used for initial Welcome).
Sourcepub async fn connect_remote_session(
&self,
remote_name: &RemoteName,
session_id: &ThreadId<str>,
thread_id: Option<&ThreadId<str>>,
) -> Result<(UnboundedSender<ClientMessage>, UnboundedReceiver<DaemonMessage>), Box<dyn Error + Send + Sync>>
pub async fn connect_remote_session( &self, remote_name: &RemoteName, session_id: &ThreadId<str>, thread_id: Option<&ThreadId<str>>, ) -> Result<(UnboundedSender<ClientMessage>, UnboundedReceiver<DaemonMessage>), Box<dyn Error + Send + Sync>>
Open a new proxied connection to a remote session. Reuses the existing SSH tunnel socket when available.
Sourcepub async fn open_raw_connection(
&self,
remote_name: &RemoteName,
) -> Result<(UnboundedSender<ClientMessage>, UnboundedReceiver<DaemonMessage>), Box<dyn Error + Send + Sync>>
pub async fn open_raw_connection( &self, remote_name: &RemoteName, ) -> Result<(UnboundedSender<ClientMessage>, UnboundedReceiver<DaemonMessage>), Box<dyn Error + Send + Sync>>
Open a raw connection to a remote daemon (Welcome consumed, no Connect sent). Used for migration flows where we send custom messages.
Sourcepub fn get_ssh_args(&self, remote_name: &RemoteName) -> Option<Vec<String>>
pub fn get_ssh_args(&self, remote_name: &RemoteName) -> Option<Vec<String>>
Get the SSH args for a remote by name.
Sourcepub fn remote_info_list(&self) -> Vec<RemoteInfo>
pub fn remote_info_list(&self) -> Vec<RemoteInfo>
Return the current status of all configured remotes.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RemoteDaemons
impl RefUnwindSafe for RemoteDaemons
impl Send for RemoteDaemons
impl Sync for RemoteDaemons
impl Unpin for RemoteDaemons
impl UnsafeUnpin for RemoteDaemons
impl UnwindSafe for RemoteDaemons
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