Expand description
The C ABI for store-and-forward buffers.
These functions wrap [pamoja_sync] for callers that reach the SDK through
the flat C boundary: the queue a node writes into while it has nowhere to
send, and the drain that empties it once a link comes back.
Two stores cross, behind one handle. An in-memory queue is the right choice for a test or a process that will not outlive its buffer; a file-backed one survives a reboot, which is what a node in a place with no reliable power actually needs. The kind is chosen when the store is created and nothing afterwards has to care which it is.
Structs§
- Pamoja
Store - An opaque handle to a store-and-forward buffer.
Functions§
- pamoja_
store_ ⚠append - Adds a record to the end of a buffer.
- pamoja_
store_ ⚠drain_ to - Sends every held record over a transport, oldest first.
- pamoja_
store_ ⚠file - Opens a buffer backed by a directory, so it survives a restart.
- pamoja_
store_ ⚠free - Releases a store handle.
- pamoja_
store_ ⚠len - Reports how many records a buffer holds.
- pamoja_
store_ memory - Creates a buffer held in memory.
- pamoja_
store_ ⚠peek - Reads the oldest record without removing it.
- pamoja_
store_ ⚠pop - Removes and returns the oldest record.