Type Alias ManagerClient

Source
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

Source

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.

Source

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.

Source

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.

Source

pub async fn version(&mut self) -> Result<SemVer>

Retrieves the version of the manager.

Source

pub async fn info(&mut self, id: ConnectionId) -> Result<ConnectionInfo>

Retrieves information about a specific connection

Source

pub async fn kill(&mut self, id: ConnectionId) -> Result<()>

Kills the specified connection

Source

pub async fn list(&mut self) -> Result<ConnectionList>

Retrieves a list of active connections