base/bif/cluster.bif.zeek
- Cluster
- GLOBAL
- Namespaces:
Cluster, GLOBAL
Summary
Functions
Initialize the global cluster backend. |
|
Create a data structure that may be used to send a remote event via
|
|
Publishes an event to a given topic. |
|
Publishes an event to a node within a pool according to Rendezvous (Highest Random Weight) hashing strategy. |
|
Publishes an event to a node within a pool according to Round-Robin distribution strategy. |
Detailed Interface
Functions
- Cluster::Backend::__init
-
Initialize the global cluster backend.
- Returns:
true on success.
- Cluster::make_event
- Type:
function
(…) :Cluster::Event
Create a data structure that may be used to send a remote event via
Broker::publish
.- Parameters:
args – an event, followed by a list of argument values that may be used to call it.
- Returns:
A
Cluster::Event
instance that can be published viaCluster::publish
,Cluster::publish_rr
orCluster::publish_hrw
.
- Cluster::publish
-
Publishes an event to a given topic.
- Parameters:
topic – a topic associated with the event message.
args – Either the event arguments as already made by
Cluster::make_event
or the argument list to pass along to it.
- Returns:
true if the message is sent.
- Cluster::publish_hrw
-
Publishes an event to a node within a pool according to Rendezvous (Highest Random Weight) hashing strategy.
- Parameters:
pool – the pool of nodes that are eligible to receive the event.
key – data used for input to the hashing function that will uniformly distribute keys among available nodes.
args – Either the event arguments as already made by
Broker::make_event
or the argument list to pass along to it.
- Returns:
true if the message is sent.
- Cluster::publish_rr
-
Publishes an event to a node within a pool according to Round-Robin distribution strategy.
- Parameters:
pool – the pool of nodes that are eligible to receive the event.
key – an arbitrary string to identify the purpose for which you’re distributing the event. e.g. consider using namespacing of your script like “Intel::cluster_rr_key”.
args – Either the event arguments as already made by
Cluster::make_event
or the argument list to pass along to it.
- Returns:
true if the message is sent.