|
ORE Studio 0.0.4
|
Background coroutine that publishes a heartbeat on a timer. More...
#include <heartbeat_publisher.hpp>

Public Member Functions | |
| heartbeat_publisher (std::string service_name, std::string version, ores::nats::service::client &nats, std::uint32_t interval_seconds=15) | |
| boost::asio::awaitable< void > | run () |
| Runs the heartbeat loop as an awaitable coroutine. | |
Background coroutine that publishes a heartbeat on a timer.
Embed one per domain service by co_spawning run() from the on_started callback in ores::service::service::run(). The heartbeat is received by the telemetry service which persists it to ores_telemetry_service_samples_tbl, enabling the service dashboard to show live RAG status for every running service instance.
A unique instance_id UUID is generated at construction time so that multiple instances of the same service can be tracked independently.
| boost::asio::awaitable< void > run | ( | ) |
Runs the heartbeat loop as an awaitable coroutine.
Publishes one heartbeat immediately on start, then repeats every interval_seconds. Exits cleanly when the io_context shuts down.