oa_gateway_core/
lib.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
//! Protocol-agnostic routing engine.
//!
//! The core never parses a payload and never names a protocol. Adapters
//! map native frames onto [`Envelope`] values and subscribe through
//! [`Engine`]. Matching is a [`RouteKey`] (topic plus optional type
//! hint). Fan-out is `try_send`: a slow subscriber loses the message
//! rather than blocking the publisher.
//!
//! Adding a protocol means adding an adapter crate, not changing this
//! one. The plugin contract is `oa_gateway_adapter::Adapter`; the
//! walkthrough is `docs/writing-an-adapter.md`.

mod engine;
mod envelope;
mod headers;
mod ids;
mod route;

pub use engine::{
    Delivery, Engine, EngineError, EngineStats, PublishOutcome, SubscriberKey,
    DEFAULT_CHANNEL_CAPACITY,
};
pub use envelope::{ContentType, Envelope};
pub use headers::{HDR_ID, HDR_ORIGIN, HDR_TOPIC, HDR_TYPE_HINT};
pub use ids::{AdapterId, MessageId, SubId};
pub use route::RouteKey;