pub struct SecurityReloader { /* private fields */ }Expand description
Owned periodic reload; dropping it stops file reads and signing-key refresh.
Implementations§
Source§impl SecurityReloader
impl SecurityReloader
Sourcepub fn spawn(
loader: SecurityLoader,
security: Arc<ServerSecurity>,
clock: Arc<dyn Clock>,
) -> Self
pub fn spawn( loader: SecurityLoader, security: Arc<ServerSecurity>, clock: Arc<dyn Clock>, ) -> Self
Spawns the reload task on the current Tokio runtime.
Every five seconds it calls SecurityLoader::load with clock’s
time and passes any changed generation to
SecurityLoader::install, which publishes it to security. A
failed load or install is logged at warn and the previous generation
stays live; the next attempt retries. Pass a loader that has already
been started with security’s first
generation.
§Panics
Panics if called outside a Tokio runtime.
Trait Implementations§
Source§impl Drop for SecurityReloader
impl Drop for SecurityReloader
Auto Trait Implementations§
impl Freeze for SecurityReloader
impl RefUnwindSafe for SecurityReloader
impl Send for SecurityReloader
impl Sync for SecurityReloader
impl Unpin for SecurityReloader
impl UnsafeUnpin for SecurityReloader
impl UnwindSafe for SecurityReloader
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more