pub struct ReloadHandle { /* private fields */ }Expand description
Replaces the configuration of a running server.
The point of this type is a guarantee: a SIGHUP with a broken configuration
file — a typo, a half-written certificate mid-renewal — must leave the server
running exactly as it was. A proxy that exits when handed a bad config would
turn a typo into an outage, and certbot --deploy-hook will send SIGHUP at
three in the morning with nobody watching.
So nothing is applied until everything has been parsed and validated: the file is read, the new certificate and key are loaded, and only then is anything swapped. There is no intermediate state where the endpoint has the new certificate but the old users, or vice versa.
Implementations§
Source§impl ReloadHandle
impl ReloadHandle
Sourcepub fn reload(&self, path: &Path) -> Result<Arc<Config>>
pub fn reload(&self, path: &Path) -> Result<Arc<Config>>
Re-reads the configuration file and applies it, or changes nothing.
Returns the newly applied configuration, or an error describing why the old
one is still in force. Existing connections are deliberately unaffected —
they keep the configuration they were accepted with (see Server::serve).
Trait Implementations§
Source§impl Clone for ReloadHandle
impl Clone for ReloadHandle
Source§fn clone(&self) -> ReloadHandle
fn clone(&self) -> ReloadHandle
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more