pub struct TunnelManager { /* private fields */ }Expand description
Tunnel manager for creating and managing tunnels
Implementations§
Source§impl TunnelManager
impl TunnelManager
Sourcepub fn new(config: &TunnelConfig) -> Result<Self>
pub fn new(config: &TunnelConfig) -> Result<Self>
Create a new tunnel manager
Sourcepub async fn create_tunnel(&self, config: &TunnelConfig) -> Result<TunnelStatus>
pub async fn create_tunnel(&self, config: &TunnelConfig) -> Result<TunnelStatus>
Create and start a tunnel
Sourcepub async fn get_status(&self) -> Result<Option<TunnelStatus>>
pub async fn get_status(&self) -> Result<Option<TunnelStatus>>
Get the current tunnel status
Sourcepub async fn refresh_status(&self) -> Result<TunnelStatus>
pub async fn refresh_status(&self) -> Result<TunnelStatus>
Refresh tunnel status from provider
Sourcepub async fn stop_tunnel(&self) -> Result<()>
pub async fn stop_tunnel(&self) -> Result<()>
Stop and delete the tunnel
Sourcepub async fn stop_tunnel_by_id(&self, tunnel_id: &str) -> Result<()>
pub async fn stop_tunnel_by_id(&self, tunnel_id: &str) -> Result<()>
Stop and delete a tunnel by ID
Sourcepub async fn list_tunnels(&self) -> Result<Vec<TunnelStatus>>
pub async fn list_tunnels(&self) -> Result<Vec<TunnelStatus>>
List all tunnels
Sourcepub async fn is_available(&self) -> bool
pub async fn is_available(&self) -> bool
Check if provider is available
Auto Trait Implementations§
impl Freeze for TunnelManager
impl !RefUnwindSafe for TunnelManager
impl Send for TunnelManager
impl Sync for TunnelManager
impl Unpin for TunnelManager
impl !UnwindSafe for TunnelManager
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