Commit Graph

1 Commits

Author SHA1 Message Date
Joseph Doherty
9ece600ebc feat: add closed connection ring buffer for /connz?state=closed (Gap 10.1)
Replace ConcurrentQueue<ClosedClient> with ClosedConnectionRingBuffer — a
fixed-size ring buffer that overwrites oldest entries when full, eliminating
the manual dequeue-to-cap loop. Adds TotalClosed lifetime counter, GetRecent(),
and Clear(). Wires the ring buffer into NatsServer including capacity resize
on config reload. Adds 10 unit tests covering capacity, ordering, wrapping,
TotalClosed tracking, and Clear behavior.
2026-02-25 13:07:16 -05:00