Expand description
Offline buffer / store-and-forward for resilience (CLS-09).
When an edge device loses connectivity it can push signed AuditRecords into an
OfflineBuffer. When the link recovers the caller calls OfflineBuffer::flush which
replays the buffered records through an IngestService in the original order and reports
how many were accepted.
§Pluggable storage
BufferStore is a synchronous trait. The default implementation is
InMemoryBufferStore (volatile, useful for tests and embedded environments with no
persistent storage). An optional SQLite-backed store is available behind the
buffer-sqlite feature flag ([SqliteBufferStore]).
§Flush semantics
Records are replayed oldest-first. A record that returns
[IngestServiceError::Verify(IngestError::Duplicate)] is treated as “already delivered”
and counted as accepted. Any other error stops the flush at that point and the
remaining records stay in the buffer.
Structs§
- Buffered
Entry - A single entry in the offline buffer.
- Flush
Report - Report returned by
OfflineBuffer::flush. - InMemory
Buffer Store - Volatile in-memory implementation of
BufferStore. Entries are lost on drop. - InMemory
Buffer Store Error - Offline
Buffer - A store-and-forward buffer that accumulates signed
AuditRecords during connectivity loss and replays them in order when the link recovers.
Enums§
- Flush
Error - Error returned by
OfflineBuffer::flush.
Traits§
- Buffer
Store - Pluggable persistent / volatile storage for
OfflineBuffer.