pub struct ControlPlane { /* private fields */ }Expand description
Control plane server that accepts tunnel client connections via mTLS
Implementations§
Source§impl ControlPlane
impl ControlPlane
pub fn new( router: Arc<Router>, tls_acceptor: TlsAcceptor, dns_provider: Arc<dyn DnsProvider>, base_domain: String, response_registry: ResponseRegistry, tcp_plane: Arc<TcpPlane>, tcp_registry: TcpConnectionRegistry, ) -> Arc<Self>
Sourcepub async fn run(self: Arc<Self>, addr: SocketAddr) -> Result<()>
pub async fn run(self: Arc<Self>, addr: SocketAddr) -> Result<()>
Start listening for tunnel client connections
Sourcepub async fn run_with_listener(
self: Arc<Self>,
listener: TcpListener,
) -> Result<()>
pub async fn run_with_listener( self: Arc<Self>, listener: TcpListener, ) -> Result<()>
Start accepting connections from a pre-bound listener
This is useful for testing where the caller wants to bind to an ephemeral port and get the actual address before starting the server.
Auto Trait Implementations§
impl Freeze for ControlPlane
impl !RefUnwindSafe for ControlPlane
impl Send for ControlPlane
impl Sync for ControlPlane
impl Unpin for ControlPlane
impl !UnwindSafe for ControlPlane
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