MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / drain

Method drain

nodedb-cluster/src/auth/audit.rs:105–108  ·  view source on GitHub ↗

Drain all events for inspection.

(&self)

Source from the content-addressed store, hash-verified

103
104 /// Drain all events for inspection.
105 pub fn drain(&self) -> Vec<AuditEvent> {
106 let mut guard = self.events.lock().expect("audit lock poisoned");
107 std::mem::take(&mut *guard)
108 }
109
110 /// Return a snapshot of all events without draining.
111 pub fn snapshot(&self) -> Vec<AuditEvent> {

Callers 4

start_allMethod · 0.45
wait_for_any_ackFunction · 0.45
try_join_onceFunction · 0.45

Calls 3

takeFunction · 0.85
lockMethod · 0.80
expectMethod · 0.45

Tested by 1