pamoja_loopback/lib.rs
1//! An in-process loopback transport for hardware-free testing and examples.
2//!
3//! [`LoopbackTransport`] implements the core [`Transport`](pamoja_core::Transport)
4//! trait against a shared in-memory [`LoopbackBroker`] instead of a network, so
5//! examples, the simulators, and the cross-language conformance scenarios can
6//! exercise the full publish/subscribe path with no broker process and no
7//! hardware. Topic filters follow MQTT semantics, including the `+` single-level
8//! and `#` multi-level wildcards.
9//!
10//! Clone one broker into every transport that should share a namespace: a publish
11//! on any transport is delivered to every transport whose subscriptions match.
12//!
13//! [`Faulty`] decorates any transport to inject send failures, so degraded-link
14//! behavior such as store-and-forward retry can be tested deterministically.
15
16mod broker;
17mod faulty;
18mod transport;
19
20pub use broker::LoopbackBroker;
21pub use faulty::Faulty;
22pub use transport::{LoopbackTransport, Message};