pub trait Protocol: Send {
// Required method
fn register(
self: Box<Self>,
server: &mut PingoraServerRuntime,
config: &Config,
pipelines: &ListenerPipelines,
) -> Result<Vec<Sender<bool>>, ProxyError>;
}Expand description
A protocol implementation that registers services onto a shared server runtime.
Required Methods§
Sourcefn register(
self: Box<Self>,
server: &mut PingoraServerRuntime,
config: &Config,
pipelines: &ListenerPipelines,
) -> Result<Vec<Sender<bool>>, ProxyError>
fn register( self: Box<Self>, server: &mut PingoraServerRuntime, config: &Config, pipelines: &ListenerPipelines, ) -> Result<Vec<Sender<bool>>, ProxyError>
Register this protocol’s services. Does not block.
Returns any TLS certificate watcher shutdown senders. The caller must keep these alive until server shutdown; dropping them signals the watcher tasks to stop.
§Errors
Returns ProxyError if listener binding or setup fails.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".