allsource_core/infrastructure/replication/mod.rs
1//! Leader-follower replication via WAL shipping.
2//!
3//! When `ALLSOURCE_REPLICATION_ENABLED=true` on a leader node, the WAL shipper
4//! opens a TCP listener on `ALLSOURCE_REPLICATION_PORT` (default 3910) and
5//! streams WAL entries to connected followers using newline-delimited JSON.
6//!
7//! Followers use the WAL receiver to connect, subscribe, validate, and replay
8//! entries into their local EventStore.
9
10pub mod protocol;
11pub mod wal_receiver;
12pub mod wal_shipper;
13
14pub use wal_receiver::{FollowerReplicationStatus, WalReceiver};
15pub use wal_shipper::{ReplicationMode, ReplicationStatus, WalShipper};