|
Protective Stop
|
Periodically POSTs a bearer-authenticated RUNNING check-in to a fleet console. More...
#include <announce.hpp>
Public Member Functions | |
| MachineAnnouncer (AnnounceConfig config, int port, uint32_t machine_id, std::function< MachineSnapshot()> snapshot_fn) | |
| MachineAnnouncer (const MachineAnnouncer &)=delete | |
| MachineAnnouncer & | operator= (const MachineAnnouncer &)=delete |
| bool | start () |
| Launches the check-in thread. | |
| void | stop () |
| Stops the thread and joins. Idempotent. | |
| bool | enabled () const |
| True while the check-in thread is running. | |
Periodically POSTs a bearer-authenticated RUNNING check-in to a fleet console.
Runs on its own thread, off the safety path: failures only log. Driven from the node's activate/deactivate transitions, so it runs only while the node is ACTIVE. start() and stop() are idempotent.
| protective_stop_machine::MachineAnnouncer::MachineAnnouncer | ( | AnnounceConfig | config, |
| int | port, | ||
| uint32_t | machine_id, | ||
| std::function< MachineSnapshot()> | snapshot_fn ) |
| config | Deployment values. |
| port | UDP port the machine listens on. |
| machine_id | Device ID of this machine. |
| snapshot_fn | Returns the state to report; called from the check-in thread. |
| bool protective_stop_machine::MachineAnnouncer::start | ( | ) |
Launches the check-in thread.