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
27
28
29
30
31
32
33
34
35
36
37
//! State bus contracts: KV, pubsub, and lease-oriented coordination.
//!
//! This is the first high-value abstraction for clustered Zebflow.
//!
//! The current `infra/mem` implementation already provides project-scoped KV and pubsub.
//! This module wraps that behavior behind an explicit interface so the runtime can later swap
//! between:
//!
//! - `MemStateBus` for standalone and pinned single-runner deployments
//! - `RedisStateBus` or similar for shared multi-runner coordination
//!
//! Long-term uses:
//!
//! - `n.mem.*` nodes
//! - mem-subscribe triggers
//! - cache eviction fanout
//! - coordination leases / leader election
//!
//! Current implementation notes:
//!
//! - namespaces, keys, and channels are validated explicitly
//! - capabilities and limits are surfaced to callers
//! - the first backend remains ultra-lightweight and in-process
//! - Redis or another shared backend can later implement the same contract
pub use ;
pub use ;
pub use MemStateBus;
pub use RedisStateBus;