pub struct TlsReloadRegistry { /* private fields */ }Expand description
Process-global singleton registry of TLS reload handlers.
The global is reachable through two handles that wrap the same
allocation: TlsReloadRegistry::global() returns a &'static
reference and TlsReloadRegistry::global_arc() returns an
Arc clone — a registration made through either handle is
observable through the other. Isolated instances for tests come
from Default, which never touches the process global.
Each TLS-terminating component registers its handler when it first spawns, and unregisters on release/eviction.
Implementations§
Source§impl TlsReloadRegistry
impl TlsReloadRegistry
Sourcepub fn global() -> &'static TlsReloadRegistry
pub fn global() -> &'static TlsReloadRegistry
Returns a reference to the process-global singleton.
Sourcepub fn global_arc() -> Arc<TlsReloadRegistry> ⓘ
pub fn global_arc() -> Arc<TlsReloadRegistry> ⓘ
Sourcepub fn register(&self, handler: Arc<dyn TlsReloadHandler>)
pub fn register(&self, handler: Arc<dyn TlsReloadHandler>)
Register a handler so it can be found later via find.
Sourcepub fn find(
&self,
scheme: &str,
host: &str,
port: u16,
) -> Option<Arc<dyn TlsReloadHandler>>
pub fn find( &self, scheme: &str, host: &str, port: u16, ) -> Option<Arc<dyn TlsReloadHandler>>
Find the handler that matches (scheme, host, port), if any.
Sourcepub fn unregister(&self, scheme: &str, host: &str, port: u16)
pub fn unregister(&self, scheme: &str, host: &str, port: u16)
Remove handlers matching (scheme, host, port). Called on server release/eviction.