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 keeps
these alive to retain the ability to stop a watcher early via
send(true); the watcher tasks otherwise run for the process lifetime
(dropping the senders does not stop them).
§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".