mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
A suggestion for reminding folks about calling events in Module namespaces.
This commit is contained in:
parent
7327c87c0a
commit
bbd65bcc74
1 changed files with 22 additions and 0 deletions
|
@ -376,6 +376,28 @@ This section contains a few brief examples of how various communication
|
||||||
patterns one might use when developing Bro scripts that are to operate in
|
patterns one might use when developing Bro scripts that are to operate in
|
||||||
the context of a cluster.
|
the context of a cluster.
|
||||||
|
|
||||||
|
A Reminder About Events and Module Namespaces
|
||||||
|
---------------------------------------------
|
||||||
|
|
||||||
|
For the following examples, please keep in mind that when referring to event names that were
|
||||||
|
defined inside a module namespace, you should always use that namespace scoping when referring to the event name, even within the module itself. For instance:
|
||||||
|
|
||||||
|
.. code:: bro
|
||||||
|
|
||||||
|
module ModuleName;
|
||||||
|
|
||||||
|
event manager_to_workers(s: string)
|
||||||
|
{
|
||||||
|
print "got event from manager", s;
|
||||||
|
}
|
||||||
|
|
||||||
|
event some_event_handled_on_manager()
|
||||||
|
{
|
||||||
|
Broker::publish(Cluster::worker_topic, ModuleName::manager_to_workers,
|
||||||
|
"hello v0");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
Manager Sending Events To Workers
|
Manager Sending Events To Workers
|
||||||
---------------------------------
|
---------------------------------
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue