eventbus_nats/lib.rs
1pub mod builder;
2pub mod bus;
3pub mod prelude;
4
5pub use builder::EventBusBuilder;
6pub use bus::{EventBus, SubscriptionHandle};
7
8// Re-export the underlying transport crate as a namespace, so application code
9// that depends only on `eventbus-nats` can still reach less-common types via
10// `eventbus_nats::nats::...` without adding `bus-nats` to its `Cargo.toml`.
11pub use bus_nats as nats;
12
13// Re-export the trait crate. Useful when an app needs `bus_core` types
14// directly (manual `Event` impls, custom `IdempotencyStore`, …) without
15// declaring `bus-core` itself.
16pub use bus_core as core;
17
18// Curated shortcuts for the most common transport types so app boot code
19// reads `use eventbus_nats::{NatsClient, StreamConfig, ...};` instead of
20// reaching into the namespace.
21pub use bus_nats::{ConnectOptions, NatsClient, NatsPublisher, StreamConfig, SubscribeOptions};
22
23#[cfg(feature = "nats-kv-inbox")]
24pub use bus_nats::NatsKvIdempotencyConfig;
25
26#[cfg(feature = "redis-inbox")]
27pub use bus_nats::{RedisIdempotencyConfig, RedisIdempotencyStore};