pub trait EventSink:
Send
+ Sync
+ 'static {
// Required methods
fn emit(&self, payload: &str);
fn flush(&self);
}Expand description
Re-export the canonical EventSink trait from auths-telemetry.
Synchronous, fire-and-forget sink for structured telemetry payloads.
Implementations are responsible for persistence, buffering, and flushing.
emit() must never block the caller; defer I/O to a background thread or
accumulate in memory. flush() blocks until all previously-emitted payloads
have been persisted.
Usage:
ⓘ
use auths_telemetry::ports::EventSink;
struct NullSink;
impl EventSink for NullSink {
fn emit(&self, _payload: &str) {}
fn flush(&self) {}
}