mirror of
https://github.com/zeek/zeek.git
synced 2025-10-09 10:08:20 +00:00
Add support for making the supervisor listen for requests
The supervisor now starts listening on the configured Broker default address and port when the new boolean SupervisorControl::enable_listen is T. Listening remains disabled by default. Listening allows nodes to communicate with the supervisor via the events laid out in control.zeek, to conduct further node management.
This commit is contained in:
parent
36051dc9a1
commit
efaa9ec3be
2 changed files with 12 additions and 1 deletions
|
@ -3,7 +3,6 @@
|
|||
|
||||
@load ./api
|
||||
@load ./control
|
||||
@load base/frameworks/broker
|
||||
|
||||
function Supervisor::status(node: string): Supervisor::Status
|
||||
{
|
||||
|
@ -42,6 +41,13 @@ function Supervisor::node(): Supervisor::NodeConfig
|
|||
|
||||
event zeek_init() &priority=10
|
||||
{
|
||||
if ( Supervisor::is_supervisor() && SupervisorControl::enable_listen )
|
||||
{
|
||||
Broker::listen(Broker::default_listen_address,
|
||||
Broker::default_port,
|
||||
Broker::default_listen_retry);
|
||||
}
|
||||
|
||||
Broker::subscribe(SupervisorControl::topic_prefix);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue