mirror of
https://github.com/zeek/zeek.git
synced 2025-10-12 19:48:20 +00:00
Change supervisor event response topic names
They now include the request ID at the end of their topic, to possibly help with subscription filtering.
This commit is contained in:
parent
7a6355f64f
commit
25a8ba99fa
1 changed files with 4 additions and 4 deletions
|
@ -24,28 +24,28 @@ event Supervisor::stop_request()
|
||||||
event Supervisor::status_request(reqid: string, nodes: string)
|
event Supervisor::status_request(reqid: string, nodes: string)
|
||||||
{
|
{
|
||||||
local res = Supervisor::status(nodes);
|
local res = Supervisor::status(nodes);
|
||||||
local topic = Supervisor::topic_prefix + "/status_response";
|
local topic = Supervisor::topic_prefix + fmt("/status_response/%s", reqid);
|
||||||
Broker::publish(topic, Supervisor::status_response, reqid, res);
|
Broker::publish(topic, Supervisor::status_response, reqid, res);
|
||||||
}
|
}
|
||||||
|
|
||||||
event Supervisor::create_request(reqid: string, node: Node)
|
event Supervisor::create_request(reqid: string, node: Node)
|
||||||
{
|
{
|
||||||
local res = Supervisor::create(node);
|
local res = Supervisor::create(node);
|
||||||
local topic = Supervisor::topic_prefix + "/create_response";
|
local topic = Supervisor::topic_prefix + fmt("/create_response/%s", reqid);
|
||||||
Broker::publish(topic, Supervisor::create_response, reqid, res);
|
Broker::publish(topic, Supervisor::create_response, reqid, res);
|
||||||
}
|
}
|
||||||
|
|
||||||
event Supervisor::destroy_request(reqid: string, nodes: string)
|
event Supervisor::destroy_request(reqid: string, nodes: string)
|
||||||
{
|
{
|
||||||
local res = Supervisor::destroy(nodes);
|
local res = Supervisor::destroy(nodes);
|
||||||
local topic = Supervisor::topic_prefix + "/destroy_response";
|
local topic = Supervisor::topic_prefix + fmt("/destroy_response/%s", reqid);
|
||||||
Broker::publish(topic, Supervisor::destroy_response, reqid, res);
|
Broker::publish(topic, Supervisor::destroy_response, reqid, res);
|
||||||
}
|
}
|
||||||
|
|
||||||
event Supervisor::restart_request(reqid: string, nodes: string)
|
event Supervisor::restart_request(reqid: string, nodes: string)
|
||||||
{
|
{
|
||||||
local res = Supervisor::restart(nodes);
|
local res = Supervisor::restart(nodes);
|
||||||
local topic = Supervisor::topic_prefix + "/restart_response";
|
local topic = Supervisor::topic_prefix + fmt("/restart_response/%s", reqid);
|
||||||
Broker::publish(topic, Supervisor::restart_response, reqid, res);
|
Broker::publish(topic, Supervisor::restart_response, reqid, res);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue