pub struct AuditLogSubscriber { /* private fields */ }Expand description
Subscriber that persists every received event as an audit log entry.
Extracts contextual IDs (run, step, user) from the event payload for efficient filtering, and stores the full event as JSON.
§Examples
use std::sync::Arc;
use ironflow_engine::notify::{AuditLogSubscriber, Event, EventPublisher};
use ironflow_store::memory::InMemoryStore;
let store = Arc::new(InMemoryStore::new());
let mut publisher = EventPublisher::new();
publisher.subscribe(
AuditLogSubscriber::new(store),
Event::ALL,
);Implementations§
Source§impl AuditLogSubscriber
impl AuditLogSubscriber
Sourcepub fn new(store: Arc<dyn AuditLogStore>) -> Self
pub fn new(store: Arc<dyn AuditLogStore>) -> Self
Create a new subscriber backed by the given store.
§Examples
use std::sync::Arc;
use ironflow_engine::notify::AuditLogSubscriber;
use ironflow_store::memory::InMemoryStore;
let store = Arc::new(InMemoryStore::new());
let subscriber = AuditLogSubscriber::new(store);Trait Implementations§
Source§impl EventSubscriber for AuditLogSubscriber
impl EventSubscriber for AuditLogSubscriber
Auto Trait Implementations§
impl Freeze for AuditLogSubscriber
impl !RefUnwindSafe for AuditLogSubscriber
impl Send for AuditLogSubscriber
impl Sync for AuditLogSubscriber
impl Unpin for AuditLogSubscriber
impl UnsafeUnpin for AuditLogSubscriber
impl !UnwindSafe for AuditLogSubscriber
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