Skip to main content

build_reloadable

Function build_reloadable 

Source
pub fn build_reloadable(
    tls: &TlsConfig,
    http2_enabled: bool,
) -> Result<Arc<ArcSwap<ServerConfig>>, TlsError>
Expand description

Builds a hot-reloadable TLS config: the initial ServerConfig wrapped in an [ArcSwap] so spawn_cert_watcher can swap it in on cert rotation. Fail-fast: a bad cert/key at startup surfaces here.