pub trait EventExporter: Send + Sync {
// Required methods
fn export<'life0, 'life1, 'async_trait>(
&'life0 self,
event: &'life1 HiveEvent,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn flush<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Trait for exporting HiveEvents to external observability systems.
When registered with HiveMindBuilder::event_exporter(), the exporter
receives every event emitted by the agent runtime. Export is fire-and-forget —
errors are logged but don’t block agent execution.
Must be Send + Sync for use across Tokio tasks.
Required Methods§
Sourcefn export<'life0, 'life1, 'async_trait>(
&'life0 self,
event: &'life1 HiveEvent,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn export<'life0, 'life1, 'async_trait>(
&'life0 self,
event: &'life1 HiveEvent,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Export a single event. Called for every HiveEvent emission.
Implementations should be non-blocking. For network transports, consider buffering and batch-sending.