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§
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
Sourcefn remove_session(&self, token: Token) -> bool
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
fn backends(&self) -> Rc<RefCell<BackendMap>>
fn clusters(&self) -> &HashMap<ClusterId, Cluster>
Sourcefn sessions(&self) -> Rc<RefCell<SessionManager>>
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".