Expand description
The C ABI for the cost-aware transport ladder.
These functions wrap [pamoja_ladder] for callers that reach the SDK through
the flat C boundary. A ladder is the answer to a node that has more than one
way to reach the network and no single one that always works: rungs are tried
in the order they were added, cheapest first, and a message no rung accepts
goes into a buffer rather than being lost.
The Rust ladder is generic over its buffer, which cannot cross a C ABI, so
this one is built over the store handle from crate::sync. That handle
already covers both an in-memory and a file-backed queue, so nothing is given
up: a caller still chooses whether the buffer survives a restart.
Structs§
- Pamoja
Ladder - An opaque handle to a ladder and the buffer behind it.
Enums§
- Pamoja
Delivery - What became of a message handed to a ladder.
Functions§
- pamoja_
ladder_ ⚠buffered - Reports how many messages are waiting in the buffer.
- pamoja_
ladder_ ⚠connect - Connects every rung, so a send can be tried against each in turn.
- pamoja_
ladder_ ⚠flush - Replays the buffer over the rungs, oldest message first.
- pamoja_
ladder_ ⚠free - Releases a ladder handle, and the rungs and buffer it owns.
- pamoja_
ladder_ ⚠new - Creates a ladder with no rungs, buffering into a store.
- pamoja_
ladder_ ⚠rung - Adds a rung, which is tried after the rungs already added.
- pamoja_
ladder_ ⚠send - Sends a payload, falling through the rungs and buffering if none take it.