use super::core::WalManager;
impl WalManager {
pub fn append_audit_durable(&self, audit_bytes: &[u8], data_lsn: u64) -> crate::Result<()> {
if let Some(ref audit_wal) = self.audit_wal {
audit_wal.append_durable(audit_bytes, data_lsn)?;
}
Ok(())
}
pub fn recover_audit_entries(&self) -> crate::Result<Vec<(u64, Vec<u8>)>> {
if let Some(ref audit_wal) = self.audit_wal {
audit_wal.recover()
} else {
Ok(Vec::new())
}
}
pub fn has_audit_wal(&self) -> bool {
self.audit_wal.is_some()
}
}