Skip to main content

Module bus

Module bus 

Source
Expand description

The C ABI for the in-process event bus.

These functions wrap [pamoja_bus] for callers that reach the SDK through the flat C boundary: one publisher, many subscribers, inside a single process. It is how the parts of a gateway talk to each other without knowing about each other, so a sampler can announce a reading and whatever cares about readings picks it up.

The Rust bus carries any cloneable event; a C ABI has no such parameter, so this one carries bytes. That is the shape every binding already exchanges, and a caller who wants structure encodes it with crate::codec on the way in.

Structs§

PamojaEventBus
An opaque handle to one endpoint on an event bus.

Functions§

pamoja_event_bus_free
Releases an event bus endpoint.
pamoja_event_bus_new
Creates an event bus.
pamoja_event_bus_next
Waits for the next event on this endpoint.
pamoja_event_bus_publish
Publishes an event to every subscriber.
pamoja_event_bus_subscribe
Takes another endpoint on the same bus.