gestura_core_nats/
lib.rs

1//! NATS messaging helpers, server lifecycle, and health monitoring.
2//!
3//! `gestura-core-nats` provides the optional NATS messaging integration used by
4//! Gestura for local or distributed event transport.
5//!
6//! ## Main entry points
7//!
8//! - `connect_nats` / `connect_with_retry`: connection helpers
9//! - `spawn_nats_server`: embedded/local server process startup
10//! - `publish_json`, `subscribe`, `subscribe_wildcard`: messaging primitives
11//! - `init_jetstream`: JetStream KV bootstrap helper
12//! - `DispatchEvent`: typed event envelope used by messaging flows
13//! - `NatsHealthMonitor`: health and reconnection helper when the feature is enabled
14//!
15//! ## Feature gates
16//!
17//! The `nats` feature enables the actual `async-nats` implementation. When it
18//! is disabled, the crate exposes compatible stub/no-op behavior so dependent
19//! code can compile without pretending messaging is active.
20//!
21//! ## Stable import paths
22//!
23//! Most code should import through `gestura_core::nats_mq::*`.
24
25mod nats_mq;
26
27pub use nats_mq::*;