feat(reflector): fanoutClient* stubs + hook into MQTT emit points

Adds the dispatch surface for per-client liveness deltas. The fanout
methods are stubs in this commit — they will iterate satellite/twin
links once those gain sendClient* methods (Tasks 5-7).

Also wires the new local MQTT topic client/<call>/status (retained)
into Reflector::publishClientStatus so dashboards get rich status as
a per-client topic, not only via nodes/local.
This commit is contained in:
Audric committed 2026-04-28 18:40:07 +02:00
1 parent e25ae9caa1
commit 37a6a11548
2 files changed
+62 -5

No files matched your search

+12
View File
@@ -281,6 +281,18 @@ class Reflector : public sigc::trackable
// Push the rich per-client status blob (rx, monitoredTGs, qth, ...)
// to Redis. Cheap no-op if Redis is not configured.
void publishClientStatus(ReflectorClient* client);
// Per-client liveness fanout to satellite and twin peers. Iterates
// m_satellite_con_map, m_satellite_client, and m_twin_link. Trunk
// peers are intentionally NOT fanned out (deferred per design spec).
// Bodies are stubs in this commit and become real iteration in Task 8.
void fanoutClientConnected(const std::string& callsign, uint32_t tg,
const std::string& ip);
void fanoutClientDisconnected(const std::string& callsign);
void fanoutClientRx(const std::string& callsign,
const Json::Value& rx_json);
void fanoutClientStatus(const std::string& callsign,
const Json::Value& status_json);
// Reflector-wide live:meta hash (mode, version, prefixes, ports,
// cluster TGs, satellite-server stats). Event-driven write.
void publishMetaToRedis(void);