pub type ManagerClient = Client<ManagerRequest, ManagerResponse>;
Expand description
Represents a client that can connect to a remote server manager.
Aliased Type§
pub struct ManagerClient { /* private fields */ }
Implementations§
Source§impl ManagerClient
impl ManagerClient
Sourcepub async fn launch(
&mut self,
destination: impl Into<Destination>,
options: impl Into<Map>,
handler: impl AuthHandler + Send,
) -> Result<Destination>
pub async fn launch( &mut self, destination: impl Into<Destination>, options: impl Into<Map>, handler: impl AuthHandler + Send, ) -> Result<Destination>
Request that the manager launches a new server at the given destination
with options
being passed for destination-specific details, returning the new destination
of the
spawned server.
The provided handler
will be used for any authentication requirements when connecting to
the remote machine to spawn the server.
Sourcepub async fn connect(
&mut self,
destination: impl Into<Destination>,
options: impl Into<Map>,
handler: impl AuthHandler + Send,
) -> Result<ConnectionId>
pub async fn connect( &mut self, destination: impl Into<Destination>, options: impl Into<Map>, handler: impl AuthHandler + Send, ) -> Result<ConnectionId>
Request that the manager establishes a new connection at the given destination
with options
being passed for destination-specific details.
The provided handler
will be used for any authentication requirements when connecting to
the server.
Sourcepub async fn open_raw_channel(
&mut self,
connection_id: ConnectionId,
) -> Result<RawChannel>
pub async fn open_raw_channel( &mut self, connection_id: ConnectionId, ) -> Result<RawChannel>
Establishes a channel with the server represented by the connection_id
,
returning a RawChannel
acting as the connection.
§Note
Multiple calls to open a channel against the same connection will result in establishing a duplicate channel to the same server, so take care when using this method.
Sourcepub async fn info(&mut self, id: ConnectionId) -> Result<ConnectionInfo>
pub async fn info(&mut self, id: ConnectionId) -> Result<ConnectionInfo>
Retrieves information about a specific connection
Sourcepub async fn kill(&mut self, id: ConnectionId) -> Result<()>
pub async fn kill(&mut self, id: ConnectionId) -> Result<()>
Kills the specified connection
Sourcepub async fn list(&mut self) -> Result<ConnectionList>
pub async fn list(&mut self) -> Result<ConnectionList>
Retrieves a list of active connections