pub struct SupervisorConfig {
pub default_backoff: BackoffConfig,
pub shutdown_timeout: Duration,
pub install_signal_handler: bool,
}Expand description
Configuration for the JanusSupervisor.
Fields§
§default_backoff: BackoffConfigDefault backoff configuration applied to services that don’t provide their own. Individual services can override via the per-service spawn options.
shutdown_timeout: DurationMaximum time to wait for all services to drain during shutdown. After this deadline the supervisor will log a warning and exit.
install_signal_handler: boolWhether to install a Ctrl+C / SIGTERM handler automatically.
Set to false if you want to manage signals externally and call
JanusSupervisor::trigger_shutdown manually.
Implementations§
Source§impl SupervisorConfig
impl SupervisorConfig
Sourcepub fn with_shutdown_timeout(self, timeout: Duration) -> Self
pub fn with_shutdown_timeout(self, timeout: Duration) -> Self
Builder: set the shutdown timeout.
Sourcepub fn with_default_backoff(self, backoff: BackoffConfig) -> Self
pub fn with_default_backoff(self, backoff: BackoffConfig) -> Self
Builder: set the default backoff config.
Sourcepub fn without_signal_handler(self) -> Self
pub fn without_signal_handler(self) -> Self
Builder: disable automatic signal handler installation.
Trait Implementations§
Source§impl Clone for SupervisorConfig
impl Clone for SupervisorConfig
Source§fn clone(&self) -> SupervisorConfig
fn clone(&self) -> SupervisorConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SupervisorConfig
impl Debug for SupervisorConfig
Auto Trait Implementations§
impl Freeze for SupervisorConfig
impl RefUnwindSafe for SupervisorConfig
impl Send for SupervisorConfig
impl Sync for SupervisorConfig
impl Unpin for SupervisorConfig
impl UnsafeUnpin for SupervisorConfig
impl UnwindSafe for SupervisorConfig
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