pub struct SignalHandler { /* private fields */ }Expand description
Signal handler configuration
Implementations§
Source§impl SignalHandler
impl SignalHandler
Sourcepub fn new(coordinator: Arc<ShutdownCoordinator>) -> Self
pub fn new(coordinator: Arc<ShutdownCoordinator>) -> Self
Create a new signal handler
Sourcepub fn subscribe_reload(&self) -> Receiver<()>
pub fn subscribe_reload(&self) -> Receiver<()>
Subscribe to config reload notifications
Sourcepub fn trigger_reload(&self)
pub fn trigger_reload(&self)
Trigger a config reload
Sourcepub fn coordinator(&self) -> &Arc<ShutdownCoordinator>
pub fn coordinator(&self) -> &Arc<ShutdownCoordinator>
Get the shutdown coordinator
Sourcepub async fn setup_handlers(self: Arc<Self>)
pub async fn setup_handlers(self: Arc<Self>)
Setup signal handlers (Unix)
Sourcepub async fn wait_for_shutdown(&self)
pub async fn wait_for_shutdown(&self)
Wait for shutdown signal
Auto Trait Implementations§
impl !RefUnwindSafe for SignalHandler
impl !UnwindSafe for SignalHandler
impl Freeze for SignalHandler
impl Send for SignalHandler
impl Sync for SignalHandler
impl Unpin for SignalHandler
impl UnsafeUnpin for SignalHandler
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