pub enum Staleness {
Cached,
Strict {
max_cache_age: String,
},
Unchecked,
}Expand description
Staleness policy declared on a Manifest, forwarded onto each
emitted Command. Internally tagged via mode so YAML reads
naturally:
staleness:
mode: strict
max_cache_age: 5mCached and Unchecked carry no payload, so they collapse to
just staleness: { mode: cached } / staleness: { mode: unchecked }.
Variants§
Cached
Use whatever the agent has cached for script_current /
script_status, no age limit. Silently proceed if the entries
are missing. Historical default — every pre-v0.26 Manifest
reads as this on deserialize, so introducing the field is
fully back-compatible.
Strict
Only run when the agent can verify reasonably-fresh KV state.
“Reasonably fresh” = the last confirmed connection to the
broker happened within max_cache_age (NATS KV watch is
push-based, so while connected the cache is provably up to
date; the timer only starts when the agent disconnects). When
the window expires the agent attempts a live kv.get(); if
that also fails the agent publishes a synthetic skipped
result with exit_code = 127.
Fields
Unchecked
Skip Layer 2 entirely — don’t look at script_current or
script_status. Use only for fully idempotent local scripts
where revoke semantics don’t make sense.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Staleness
impl<'de> Deserialize<'de> for Staleness
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 Staleness
Source§impl JsonSchema for Staleness
impl JsonSchema for Staleness
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 Staleness
Auto Trait Implementations§
impl Freeze for Staleness
impl RefUnwindSafe for Staleness
impl Send for Staleness
impl Sync for Staleness
impl Unpin for Staleness
impl UnsafeUnpin for Staleness
impl UnwindSafe for Staleness
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
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.