pub struct ReverseServer { /* private fields */ }Expand description
The reverse proxy server (acceptor side).
Accepts control connections from reverse clients and external clients, relaying traffic between them. Each control connection carries exactly one proxy session (matching pproxy’s backward model).
Implementations§
Source§impl ReverseServer
impl ReverseServer
pub fn new(config: ReverseServerConfig) -> Self
Sourcepub fn set_metrics(&mut self, metrics: Arc<ReverseMetrics>)
pub fn set_metrics(&mut self, metrics: Arc<ReverseMetrics>)
Attach metrics to this server instance.
Sourcepub fn state_handle(&self) -> Arc<ReverseServerState> ⓘ
pub fn state_handle(&self) -> Arc<ReverseServerState> ⓘ
Get a handle to the active server state.
Sourcepub fn cancel_token(&self) -> CancellationToken
pub fn cancel_token(&self) -> CancellationToken
Get a cancel token for external shutdown.
Sourcepub async fn run(self) -> Result<(), ProtocolError>
pub async fn run(self) -> Result<(), ProtocolError>
Start the reverse server.
Auto Trait Implementations§
impl Freeze for ReverseServer
impl RefUnwindSafe for ReverseServer
impl Send for ReverseServer
impl Sync for ReverseServer
impl Unpin for ReverseServer
impl UnsafeUnpin for ReverseServer
impl UnwindSafe for ReverseServer
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