Skip to main content

L7Proxy

Trait L7Proxy 

Source
pub trait L7Proxy {
    // Required methods
    fn kind(&self) -> ListenerType;
    fn register_socket(
        &self,
        socket: &mut TcpStream,
        token: Token,
        interest: Interest,
    ) -> Result<(), Error>;
    fn deregister_socket(&self, tcp_stream: &mut TcpStream) -> Result<(), Error>;
    fn add_session(&self, session: Rc<RefCell<dyn ProxySession>>) -> Token;
    fn remove_session(&self, token: Token) -> bool;
    fn backends(&self) -> Rc<RefCell<BackendMap>>;
    fn clusters(&self) -> &HashMap<ClusterId, Cluster>;
    fn sessions(&self) -> Rc<RefCell<SessionManager>>;
}

Required Methods§

Source

fn kind(&self) -> ListenerType

Source

fn register_socket( &self, socket: &mut TcpStream, token: Token, interest: Interest, ) -> Result<(), Error>

Source

fn deregister_socket(&self, tcp_stream: &mut TcpStream) -> Result<(), Error>

Source

fn add_session(&self, session: Rc<RefCell<dyn ProxySession>>) -> Token

Source

fn remove_session(&self, token: Token) -> bool

Remove the session from the session manager slab. Returns true if the session was actually there before deletion

Source

fn backends(&self) -> Rc<RefCell<BackendMap>>

Source

fn clusters(&self) -> &HashMap<ClusterId, Cluster>

Source

fn sessions(&self) -> Rc<RefCell<SessionManager>>

Access the worker’s [SessionManager] for per-(cluster, source-IP) connection-limit accounting. The mux uses this to track / untrack stream-granular (cluster_id, ip) entries and consult the cluster_ip_at_limit gate before each backend connect.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§