pub struct Bark {
pub at_ms: u64,
pub rule: String,
pub subject: String,
pub message: String,
pub sinks: Vec<SinkOutcome>,
}Expand description
One fired alert, as it lands in $SHEP_HOME/barks.jsonl.
One JSON object per line, because the file is appended to by two
writers (the bark dog when a rule fires, and the shepherd when an
enabled dog exhausts its budget) and read by a third (shep barks).
A line-delimited format is the one shape where an interrupted write
costs the reader one record instead of the file.
Debug is derived, not redacted. Every field here is shep’s own
prose or a config key — never a sink’s target — so printing a Bark
is safe, and it must stay that way: a field that ever carried a
webhook URL or token would need its own redacted Debug (IR-41) the
day it lands, and this comment is the tripwire for that review.
Fields§
§at_ms: u64Unix millis when the alert fired.
rule: StringThe rule that fired, or daemon when the shepherd wrote this
itself.
subject: StringWhat it is about: a sheep’s name, or a dog’s.
message: StringThe human-readable line. Plain English, no theme — this is read during an incident.
sinks: Vec<SinkOutcome>Which sinks the alert was delivered to, and whether each took it. Empty when the shepherd wrote the record itself: it has no sinks and no webhook code, and says so by carrying none.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Bark
impl<'de> Deserialize<'de> for Bark
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 Bark
impl StructuralPartialEq for Bark
Auto Trait Implementations§
impl Freeze for Bark
impl RefUnwindSafe for Bark
impl Send for Bark
impl Sync for Bark
impl Unpin for Bark
impl UnsafeUnpin for Bark
impl UnwindSafe for Bark
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.