maybe_watch_tls_config

Function maybe_watch_tls_config 

Source
pub fn maybe_watch_tls_config<T, O, F, E>(
    tls_config: Arc<ReloadableTlsConfig<T, O>>,
    on_reload: F,
) -> Result<()>
where T: Send + Sync + 'static, O: TlsConfigLoader<T, Error = E> + Send + Sync + 'static, E: Error + Send + Sync + 'static, F: Fn() + Send + 'static,
Expand description

Watch TLS configuration files for changes and reload automatically

This is a generic function that works with any ReloadableTlsConfig. When changes are detected, it calls the provided callback after reloading.

T: the original TLS config O: the compiled TLS option F: the hook function to be called after reloading E: the error type for the loading operation