pub struct FileAuditSink { /* private fields */ }Expand description
A ready-to-use AuditSink that appends one tab-separated line per record
to a file — a turnkey compliance trail with no external dependency.
Line format: ts_ms \t action \t app \t stream \t detail, newline-terminated.
Writes happen on a blocking thread-pool task so the async audit worker never
stalls on disk I/O. Pair it with an AuditPipeline (which is the
Observer) on the engine builder:
use arcly_stream::audit::{AuditPipeline, FileAuditSink};
use std::sync::Arc;
let sink = Arc::new(FileAuditSink::open("/var/log/arcly/audit.log")?);
let pipeline = AuditPipeline::new(sink, 1024);
// engine = Engine::builder().observer(pipeline).build();Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FileAuditSink
impl RefUnwindSafe for FileAuditSink
impl Send for FileAuditSink
impl Sync for FileAuditSink
impl Unpin for FileAuditSink
impl UnsafeUnpin for FileAuditSink
impl UnwindSafe for FileAuditSink
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