pub struct NetVpnApi { /* private fields */ }Expand description
Bindings for Requestor part of the Net VPN API.
Implementations§
Source§impl NetVpnApi
impl NetVpnApi
Sourcepub async fn get_networks(&self) -> Result<Vec<Network>>
pub async fn get_networks(&self) -> Result<Vec<Network>>
Retrieves requestor’s virtual private networks.
Sourcepub async fn create_network(&self, network: &NewNetwork) -> Result<Network>
pub async fn create_network(&self, network: &NewNetwork) -> Result<Network>
Registers a new virtual private network overlay on the network.
Sourcepub async fn get_network(&self, network_id: &str) -> Result<Network>
pub async fn get_network(&self, network_id: &str) -> Result<Network>
Retrieves a requestor’s virtual private network.
Sourcepub async fn remove_network(&self, network_id: &str) -> Result<()>
pub async fn remove_network(&self, network_id: &str) -> Result<()>
Unregisters an existing virtual private network overlay on the network.
Sourcepub async fn get_addresses(&self, network_id: &str) -> Result<Vec<Address>>
pub async fn get_addresses(&self, network_id: &str) -> Result<Vec<Address>>
Retrieves requestor’s addresses in a virtual private network.
Sourcepub async fn add_address(
&self,
network_id: &str,
address: &Address,
) -> Result<()>
pub async fn add_address( &self, network_id: &str, address: &Address, ) -> Result<()>
Assigns a new address of the requestor in an existing private network.
Sourcepub async fn get_nodes(&self, network_id: &str) -> Result<Vec<Node>>
pub async fn get_nodes(&self, network_id: &str) -> Result<Vec<Node>>
Retrieves nodes within a virtual private network.
Sourcepub async fn add_node(&self, network_id: &str, node: &Node) -> Result<()>
pub async fn add_node(&self, network_id: &str, node: &Node) -> Result<()>
Registers a node in a virtual private network.
Sourcepub async fn remove_node(&self, network_id: &str, node_id: &str) -> Result<()>
pub async fn remove_node(&self, network_id: &str, node_id: &str) -> Result<()>
Unregisters an existing node in a virtual private network.
Sourcepub async fn list_tcp(&self, network_id: &str) -> Result<Vec<Connection>>
pub async fn list_tcp(&self, network_id: &str) -> Result<Vec<Connection>>
Lists TCP connections
Sourcepub async fn connect_tcp(
&self,
network_id: &str,
ip: &str,
port: u16,
) -> Result<Framed<BoxedSocket, Codec>>
pub async fn connect_tcp( &self, network_id: &str, ip: &str, port: u16, ) -> Result<Framed<BoxedSocket, Codec>>
Creates a new TCP connection
Trait Implementations§
Source§impl WebInterface for NetVpnApi
impl WebInterface for NetVpnApi
const API_URL_ENV_VAR: &'static str = "YAGNA_NET_URL"
const API_SUFFIX: &'static str = ya_client_model::net::NET_API_V2_VPN_PATH
fn from_client(client: WebClient) -> Self
fn rebase_service_url(base_url: Rc<Url>) -> Result<Rc<Url>>
Auto Trait Implementations§
impl Freeze for NetVpnApi
impl !RefUnwindSafe for NetVpnApi
impl !Send for NetVpnApi
impl !Sync for NetVpnApi
impl Unpin for NetVpnApi
impl !UnwindSafe for NetVpnApi
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