Push an auth event to the export buffer.
(&self, entry: AuditEntry)
| 90 | |
| 91 | /// Push an auth event to the export buffer. |
| 92 | pub fn push_auth(&self, entry: AuditEntry) { |
| 93 | let mut buf = self.auth_buffer.write().unwrap_or_else(|p| p.into_inner()); |
| 94 | if buf.len() >= self.config.buffer_size { |
| 95 | buf.pop_front(); |
| 96 | } |
| 97 | buf.push_back(entry); |
| 98 | } |
| 99 | |
| 100 | /// Drain audit events for CDC consumption (Splunk, Datadog, etc.). |
| 101 | pub fn drain_audit(&self) -> Vec<AuditEntry> { |