Expand description
Event queue — EventQueue trait + two impls.
Adapters that buffer events for later transmission depend on the
EventQueue trait so the choice of in-memory vs. persistent
backing is a deployment detail. Both impls have the same FIFO
semantics (oldest event drained first); only PersistentEventQueue
survives process restart.
InMemoryEventQueue—Mutex<VecDeque<OwnedEvent>>. Default for tests and for adapters that consider events ephemeral.PersistentEventQueue— backed by redb at a path underAppPaths::data_dir(). Pure-Rust, no C deps, ~250–400 KB binary footprint vs. SQLite’s ~1 MB. Atomic writes, MVCC reads, single-writer.
Structs§
- InMemory
Event Queue - Bounded FIFO event buffer with
Send + Syncaccess. - Persistent
Event Queue - redb-backed event queue.
Send + Sync— internalMutexwraps theDatabasehandle so adapter UI-thread pushes and worker- thread drains don’t conflict.
Enums§
Traits§
- Event
Queue - FIFO event buffer with capped size and oldest-eviction.