pub struct OnFailure {
pub retry: Option<Retry>,
}Expand description
What to do when a fire’s script fails (#418 Phase 4 — the “高”
retry/backoff gap). Where Constraints gates whether a fire
happens, OnFailure decides what happens after one ran and
came back bad. Only retry so far; future notify / disable
would join the same namespace.
Fields§
§retry: Option<Retry>Re-run the script in-process when it exits non-zero (or times
out), up to a cap, with a fixed backoff between attempts.
None (default) = no retry: a failed run is published as-is
and (for reconcile cadences) simply re-fires on the next poll
tick. See Retry.
Implementations§
Source§impl OnFailure
impl OnFailure
Sourcepub fn is_empty(&self) -> bool
pub fn is_empty(&self) -> bool
skip_serializing_if helper — an empty policy is omitted from
the wire format entirely.
Sourcepub fn lowered_retry(&self) -> Option<RetrySpec>
pub fn lowered_retry(&self) -> Option<RetrySpec>
Lower the operator-facing retry (humantime backoff) onto the
engine vocabulary the agent’s executor runs on (backoff in
whole seconds). Single seam shared by the backend command
builder and the agent’s local scheduler so the two stamp the
same crate::wire::RetrySpec onto every Command. Returns
None when there is no retry policy or the backoff is
unparseable (validate() rejects the latter at create time;
this stays fail-safe = “no retry” for a hand-edited KV blob
rather than panicking on the fire path).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for OnFailure
impl<'de> Deserialize<'de> for OnFailure
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 OnFailure
Source§impl JsonSchema for OnFailure
impl JsonSchema for OnFailure
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreimpl StructuralPartialEq for OnFailure
Auto Trait Implementations§
impl Freeze for OnFailure
impl RefUnwindSafe for OnFailure
impl Send for OnFailure
impl Sync for OnFailure
impl Unpin for OnFailure
impl UnsafeUnpin for OnFailure
impl UnwindSafe for OnFailure
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§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.