|
|
0c11989da7
|
feat: P2.5-1/2/2a/3/8 xce_cluster_config_t, xce_connect_cluster, xce_reconnect_step
Add libxce cluster discovery and auto-reconnect state machine:
- src/include/xce/cluster.h: xce_candidate_t, xce_cluster_config_t,
xce_reconnect_ctx_t types; full API with test-seam hook
xce_cluster_set_connect_fn()
- src/lib/cluster.c: xce_cluster_config_validate() (rejects invalid
candidate counts, empty hostname/port, missing identity/ca_cert),
xce_connect_cluster() (candidate fallback with single sweep),
xce_reconnect_step() state machine (IDLE→CONNECTING→CONNECTED,
with exponential backoff; nanosleep skipped when mock is active)
- src/lib/meson.build: add cluster.c to libxce_src and
test_cluster.c to libxce_test_src (P2.5-2a)
- src/lib/testsuite/test_cluster.c: 9 TDD tests covering validation,
first-candidate success, fallback, all-fail NULL return, reconnect
to CONNECTED, and backoff state transition (P2.5-8)
All 9 cluster tests pass; 3 pre-existing unrelated failures unchanged.
|
2026-05-08 02:16:08 +00:00 |
|