pub struct ShutdownConfig { /* private fields */ }Expand description
Configuration controlling graceful drain and OS signal handling for ShutdownCoordinator.
Implementations§
Source§impl ShutdownConfig
Inherent builders for ShutdownConfig.
impl ShutdownConfig
Inherent builders for ShutdownConfig.
Sourcepub fn with_drain_timeout_ms(self, drain_timeout_ms: u64) -> Self
pub fn with_drain_timeout_ms(self, drain_timeout_ms: u64) -> Self
Sourcepub fn with_callback_timeout_ms(self, callback_timeout_ms: u64) -> Self
pub fn with_callback_timeout_ms(self, callback_timeout_ms: u64) -> Self
Sets the maximum timeout for each ShutdownCallback in milliseconds.
§Arguments
u64- Per-callback timeout in milliseconds.
§Returns
Self- Updated configuration.
Source§impl ShutdownConfig
impl ShutdownConfig
pub fn get_drain_timeout_ms(&self) -> u64
pub fn get_mut_drain_timeout_ms(&mut self) -> &mut u64
pub fn set_drain_timeout_ms(&mut self, val: u64) -> &mut Self
pub fn get_callback_timeout_ms(&self) -> u64
pub fn get_mut_callback_timeout_ms(&mut self) -> &mut u64
pub fn set_callback_timeout_ms(&mut self, val: u64) -> &mut Self
pub fn get_handle_sigint(&self) -> bool
pub fn get_mut_handle_sigint(&mut self) -> &mut bool
pub fn set_handle_sigint(&mut self, val: bool) -> &mut Self
pub fn get_handle_sigterm(&self) -> bool
pub fn get_mut_handle_sigterm(&mut self) -> &mut bool
pub fn set_handle_sigterm(&mut self, val: bool) -> &mut Self
Trait Implementations§
Source§impl Clone for ShutdownConfig
impl Clone for ShutdownConfig
Source§impl Debug for ShutdownConfig
impl Debug for ShutdownConfig
Source§impl Default for ShutdownConfig
Default construction for ShutdownConfig.
impl Default for ShutdownConfig
Default construction for ShutdownConfig.
Source§fn default() -> Self
fn default() -> Self
Constructs a default ShutdownConfig with 30 s drain timeout and SIGINT/SIGTERM enabled.
impl Eq for ShutdownConfig
Source§impl PartialEq for ShutdownConfig
impl PartialEq for ShutdownConfig
impl StructuralPartialEq for ShutdownConfig
Auto Trait Implementations§
impl Forget for ShutdownConfig
impl Freeze for ShutdownConfig
impl Move for ShutdownConfig
impl RefUnwindSafe for ShutdownConfig
impl Send for ShutdownConfig
impl Sync for ShutdownConfig
impl Unpin for ShutdownConfig
impl UnsafeUnpin for ShutdownConfig
impl UnwindSafe for ShutdownConfig
Blanket Implementations§
impl<T> AnySend for T
impl<T> AnySendClone for T
impl<T> AnySendSync for T
impl<T> AnySendSyncClone for T
impl<T> AnySync for T
impl<T> AnySyncClone for T
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.