pub struct Proxy<'a, N: NetworkProvider + 'static> { /* private fields */ }Expand description
Handle for interacting with the reverse proxy subsystem.
Obtained via Node::proxy(). Follows the same pattern as
FileTransfer.
Implementations§
Source§impl<'a, N: NetworkProvider + 'static> Proxy<'a, N>
impl<'a, N: NetworkProvider + 'static> Proxy<'a, N>
Sourcepub fn subscribe(&self) -> Receiver<ProxyEvent>
pub fn subscribe(&self) -> Receiver<ProxyEvent>
Subscribe to proxy lifecycle events.
Sourcepub async fn add(&self, config: ProxyConfig) -> Result<ProxyInfo, NodeError>
pub async fn add(&self, config: ProxyConfig) -> Result<ProxyInfo, NodeError>
Add a reverse proxy that forwards traffic from a port on the mesh to
a local target — or, with routes, to several targets and static
directories by path prefix (RFC 023 §7).
Sends the proxy:add command to the sidecar and waits for confirmation.
On success, stores the proxy in local state and emits a
ProxyEvent::Started event.
Auto Trait Implementations§
impl<'a, N> !RefUnwindSafe for Proxy<'a, N>
impl<'a, N> !UnwindSafe for Proxy<'a, N>
impl<'a, N> Freeze for Proxy<'a, N>
impl<'a, N> Send for Proxy<'a, N>
impl<'a, N> Sync for Proxy<'a, N>
impl<'a, N> Unpin for Proxy<'a, N>
impl<'a, N> UnsafeUnpin for Proxy<'a, N>
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