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
38
//! Real-TCP-network E2E cluster harness — Phase C of 1000-node scaling.
//!
//! This module provides a lightweight multi-node TCP cluster substrate that
//! proves the gossip and replication primitives work over actual network
//! sockets rather than in-memory channels. It is intentionally kept small
//! and focused: it is a *test harness*, not a production cluster.
//!
//! ## Architecture
//!
//! ```text
//! ┌──────────────────────────────────────────┐
//! │ TcpClusterNetwork │
//! │ ┌──────────┐ ┌──────────┐ ┌────────┐ │
//! │ │ Node 0 │ │ Node 1 │ │ ... │ │
//! │ │127.0.0.1:│◄─┤127.0.0.1:│◄─┤ │ │
//! │ │ :PORT_A │ │ :PORT_B │ │ │ │
//! │ └────┬─────┘ └────┬─────┘ └───┬────┘ │
//! │ │ TCP gossip │ │ │
//! │ └──────────────┴────────────┘ │
//! └──────────────────────────────────────────┘
//! ```
//!
//! Each node binds on `127.0.0.1:0` (OS-assigned port), making tests
//! safe for parallel execution with no port conflicts.
//!
//! ## Sub-modules
//!
//! - [`codec`] — `ClusterMessage` enum and `MessageCodec` (length-prefixed framing)
//! - [`node`] — `TcpClusterNode`, `TcpNodeConfig`, `GossipState`
//! - [`network`] — `TcpClusterNetwork`, `NetworkStats`
pub use ;
pub use ;
pub use ;