Expand description
NATS-backed presence for DWBase components (hello/presence). This module provides a trait-based client with an in-memory mock bus suitable for tests or local runs.
Modules§
Structs§
- Mock
Nats - In-memory broadcast bus for tests/local dev (not real NATS).
- Node
Hello - Presence announcement payload.
- Peer
Info - Peer record with expiry.
- Peer
Table - Simple peer table with TTL expiry.
Traits§
- Nats
Client - Client trait so real or mock NATS can be plugged in.
Functions§
- now_
rfc3339 - start_
presence_ loop - Periodically publish hello and feed the peer table.