pub trait EventSink:
Send
+ Sync
+ 'static {
// Required methods
fn emit(&self, payload: &str);
fn flush(&self);
}Expand description
Fire-and-forget sink for structured telemetry payloads emitted by SDK operations.
Implement this trait to route SDK audit events to a logging backend, SIEM, or
stdout. The default implementation ([NoopSink]) discards all events.
Usage:
ⓘ
struct StderrSink;
impl auths_sdk::context::EventSink for StderrSink {
fn emit(&self, payload: &str) { eprintln!("{payload}"); }
fn flush(&self) {}
}