pub struct NntpProxy { /* private fields */ }Implementations§
Source§impl NntpProxy
impl NntpProxy
pub fn new(config: Config) -> Result<Self>
Sourcepub async fn prewarm_connections(&self) -> Result<()>
pub async fn prewarm_connections(&self) -> Result<()>
Prewarm all connection pools before accepting clients Creates all connections concurrently and returns when ready
Sourcepub async fn graceful_shutdown(&self)
pub async fn graceful_shutdown(&self)
Gracefully shutdown all connection pools
Sourcepub fn servers(&self) -> &[ServerConfig]
pub fn servers(&self) -> &[ServerConfig]
Get the list of servers
Sourcepub fn router(&self) -> &Arc<BackendSelector>
pub fn router(&self) -> &Arc<BackendSelector>
Get the router
Sourcepub fn connection_providers(&self) -> &[DeadpoolConnectionProvider]
pub fn connection_providers(&self) -> &[DeadpoolConnectionProvider]
Get the connection providers
Sourcepub fn buffer_pool(&self) -> &BufferPool
pub fn buffer_pool(&self) -> &BufferPool
Get the buffer pool
pub async fn handle_client( &self, client_stream: TcpStream, client_addr: SocketAddr, ) -> Result<()>
Sourcepub async fn handle_client_per_command_routing(
&self,
client_stream: TcpStream,
client_addr: SocketAddr,
) -> Result<()>
pub async fn handle_client_per_command_routing( &self, client_stream: TcpStream, client_addr: SocketAddr, ) -> Result<()>
Handle client connection using per-command routing mode
This creates a session with the router, allowing commands from this client to be routed to different backends based on load balancing.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for NntpProxy
impl !RefUnwindSafe for NntpProxy
impl Send for NntpProxy
impl Sync for NntpProxy
impl Unpin for NntpProxy
impl !UnwindSafe for NntpProxy
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