mirror of
https://github.com/zeek/zeek.git
synced 2025-10-17 14:08:20 +00:00
Add Supervisor::node_status notification event
The Supervisor generates this event every time it receives a status update from the stem, meaning a node got created or re-created. A corresponding SupervisorControl::node_status event relays the same information for users interacting with the Supervisor over Broker.
This commit is contained in:
parent
bdfa7e70f5
commit
14188fc7a7
9 changed files with 98 additions and 0 deletions
|
@ -99,3 +99,12 @@ event SupervisorControl::restart_request(reqid: string, node: string)
|
|||
local topic = SupervisorControl::topic_prefix + fmt("/restart_response/%s", reqid);
|
||||
Broker::publish(topic, SupervisorControl::restart_response, reqid, res);
|
||||
}
|
||||
|
||||
event Supervisor::node_status(node: string, pid: count)
|
||||
{
|
||||
if ( ! Supervisor::is_supervisor() )
|
||||
return;
|
||||
|
||||
local topic = SupervisorControl::topic_prefix + "/node_status";
|
||||
Broker::publish(topic, SupervisorControl::node_status, node, pid);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue