Skip to content

server

Universal server abstractions for all protocols

Universal Server - Single entry point for all protocols

Methods

fn new() -> Self

Create new universal server

fn register_protocol<H>(&mut self, protocol: &str, handler: H)
where
H: crate::AsyncProtocolHandler + ?

Register protocol handler with the router

fn add_health_endpoint(&mut self, protocol: &str, endpoint: &str)

Add health endpoint for specific protocol

fn serve_mock_request(&self, path: &str, _method: &str, _body: &[u8]) -> anyhow::Result<(u16, HashMap<String, String>, Vec<u8>)>