Skip to main content

DispatchAuditEvent

Struct DispatchAuditEvent 

Source
pub struct DispatchAuditEvent {
    pub rule_id: RuleId,
    pub trigger_kind: TriggerKind,
    pub outcome: DispatchOutcome,
    pub matched_seq: u64,
    pub matched_scope: String,
    pub context_event_count: usize,
    pub peer: Option<String>,
    pub ts_ms: u64,
}
Expand description

Structured audit record written into scryer’s tower.dispatch scope.

One Dispatched record is written before the trigger fires (idempotency marker). One Failed record is written if the trigger handler errors; the presence of Dispatched without a following Failed indicates successful invocation.

Queryable from scryer via scryer.events(Service(MeshIdent("tower.local"))).

Fields§

§rule_id: RuleId§trigger_kind: TriggerKind§outcome: DispatchOutcome§matched_seq: u64

Sequence number of the matched event (for cross-referencing).

§matched_scope: String

Scope identifier of the matched event, e.g. "service:yubaba.local".

§context_event_count: usize

Number of context events included in the dispatch payload.

§peer: Option<String>

Peer the event was federated from, if any.

§ts_ms: u64

Unix milliseconds at dispatch time.

Implementations§

Source§

impl DispatchAuditEvent

Source

pub fn to_scryer_event(&self, seq: u64) -> Event

Convert to a scryer event for writing into the tower.dispatch scope.

Scope is Service(MeshIdent("tower.local")) per arch doc §Dispatch step 3. target is "tower.dispatch" on success or "tower.dispatch.failed" on error. seq is supplied by the caller (scryer assigns per-scope sequence numbers).

Trait Implementations§

Source§

impl Clone for DispatchAuditEvent

Source§

fn clone(&self) -> DispatchAuditEvent

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for DispatchAuditEvent

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.