pub struct SinkEvent {
pub id: Uuid,
pub timestamp: DateTime<Utc>,
pub kind: SinkEventKind,
}Expand description
Telemetry event emitted by agentguard.
Fields§
§id: UuidUnique event id (UUID v4).
timestamp: DateTime<Utc>Event timestamp.
kind: SinkEventKindDiscriminator.
Implementations§
Source§impl SinkEvent
impl SinkEvent
pub fn decision( effect: impl Into<String>, principal: impl Into<String>, action: impl Into<String>, resource: impl Into<String>, policies: Vec<String>, reasons: Vec<String>, duration_micros: u64, ) -> Self
pub fn with_trace(self, trace_id: String, span_id: String) -> Self
pub fn with_tenant(self, tenant_id: String, subject_id: Option<String>) -> Self
pub fn mark_cached(self) -> Self
Trait Implementations§
Source§impl<'de> Deserialize<'de> for SinkEvent
impl<'de> Deserialize<'de> for SinkEvent
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for SinkEvent
impl RefUnwindSafe for SinkEvent
impl Send for SinkEvent
impl Sync for SinkEvent
impl Unpin for SinkEvent
impl UnwindSafe for SinkEvent
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
Mutably borrows from an owned value. Read more