Skip to main content

AuditSink

Trait AuditSink 

Source
pub trait AuditSink: Send + Sync {
    // Required method
    fn record(&self, record: &AuditRecord) -> Result<(), AuditError>;
}
Expand description

Where the audited AVC sends records. The authoritative impl is WalAuditStore; tests / non-durable deployments can swap a no-op or in-memory sink. Fail-closed contract: a record error makes the audited AVC downgrade a Permit to Deny (see AuditedAvc).

Required Methods§

Source

fn record(&self, record: &AuditRecord) -> Result<(), AuditError>

Durably record record. Returns Ok(()) only after the write is durable (fsynced). The caller MUST treat Err as fail-closed.

Implementations on Foreign Types§

Source§

impl<T: AuditSink + ?Sized> AuditSink for Arc<T>

Source§

fn record(&self, record: &AuditRecord) -> Result<(), AuditError>

Implementors§