pub struct WorkerSupervisionConfig {
pub restart_backoff_initial_ms: Option<u64>,
pub restart_backoff_max_ms: Option<u64>,
pub restart_backoff_multiplier: Option<u32>,
pub restart_window_ms: Option<u64>,
pub max_restarts_per_window: Option<u32>,
pub stop_grace_ms: Option<u64>,
}Expand description
Managed-worker supervision settings from [worker_supervision].
Fields§
§restart_backoff_initial_ms: Option<u64>Delay before the first restart in a window, milliseconds.
restart_backoff_max_ms: Option<u64>Ceiling the geometric backoff is clamped to, milliseconds.
restart_backoff_multiplier: Option<u32>Geometric growth factor per restart already made in the window.
restart_window_ms: Option<u64>Sliding window over which restarts are counted, milliseconds.
max_restarts_per_window: Option<u32>Restarts permitted within one window before an instance is failed.
stop_grace_ms: Option<u64>Grace given to each of SIGTERM and SIGKILL when stopping a managed
worker’s process group, milliseconds.
Implementations§
Source§impl WorkerSupervisionConfig
impl WorkerSupervisionConfig
Sourcepub fn resolve(self) -> Result<Option<SupervisionPolicy>, ServerError>
pub fn resolve(self) -> Result<Option<SupervisionPolicy>, ServerError>
Resolve the section into a policy.
Ok(None) is the honest reading of an ENTIRELY absent section: the
operator has not commissioned supervision, and the managed-worker
surface refuses with the remedy rather than inventing numbers.
§Errors
Returns ServerError::Config naming every missing key for a PARTIAL
section, and naming the offending key for a value that cannot express a
working discipline (a zero interval, a zero budget, a shrinking
backoff, or a ceiling below the initial delay).
Trait Implementations§
Source§impl Clone for WorkerSupervisionConfig
impl Clone for WorkerSupervisionConfig
Source§fn clone(&self) -> WorkerSupervisionConfig
fn clone(&self) -> WorkerSupervisionConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for WorkerSupervisionConfig
Source§impl Debug for WorkerSupervisionConfig
impl Debug for WorkerSupervisionConfig
Source§impl Default for WorkerSupervisionConfig
impl Default for WorkerSupervisionConfig
Source§fn default() -> WorkerSupervisionConfig
fn default() -> WorkerSupervisionConfig
Source§impl<'de> Deserialize<'de> for WorkerSupervisionConfigwhere
WorkerSupervisionConfig: Default,
impl<'de> Deserialize<'de> for WorkerSupervisionConfigwhere
WorkerSupervisionConfig: Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for WorkerSupervisionConfig
Source§impl PartialEq for WorkerSupervisionConfig
impl PartialEq for WorkerSupervisionConfig
impl StructuralPartialEq for WorkerSupervisionConfig
Auto Trait Implementations§
impl Freeze for WorkerSupervisionConfig
impl RefUnwindSafe for WorkerSupervisionConfig
impl Send for WorkerSupervisionConfig
impl Sync for WorkerSupervisionConfig
impl Unpin for WorkerSupervisionConfig
impl UnsafeUnpin for WorkerSupervisionConfig
impl UnwindSafe for WorkerSupervisionConfig
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request