diff --git a/scripts/base/frameworks/broker/main.bro b/scripts/base/frameworks/broker/main.bro index 23a701c3ef..cab205dd85 100644 --- a/scripts/base/frameworks/broker/main.bro +++ b/scripts/base/frameworks/broker/main.bro @@ -20,19 +20,19 @@ export { ## initially, or if it ever becomes disconnected. const default_connect_retry = 30sec &redef; - ## If false, do not use SSL for network connections. By default, SSL will even - ## be used if no certificates / CAs have been configured. In that case + ## If true, do not use SSL for network connections. By default, SSL will + ## even be used if no certificates / CAs have been configured. In that case ## (which is the default) the communication will be encrypted, but not ## authenticated. const disable_ssl = F &redef; ## Path to a file containing concatenated trusted certificates - ## in PEM format. If set, Bro will require valid certificates forx + ## in PEM format. If set, Bro will require valid certificates for ## all peers. const ssl_cafile = "" &redef; ## Path to an OpenSSL-style directory of trusted certificates. - ## If set, Bro will require valid certificates forx + ## If set, Bro will require valid certificates for ## all peers. const ssl_capath = "" &redef; @@ -96,9 +96,9 @@ export { PEER_INVALID = 3, ## Remote peer not listening. PEER_UNAVAILABLE = 4, - ## An peering request timed out. + ## A peering request timed out. PEER_TIMEOUT = 5, - ## Master with given name already exist. + ## Master with given name already exists. MASTER_EXISTS = 6, ## Master with given name does not exist. NO_SUCH_MASTER = 7, @@ -106,7 +106,7 @@ export { NO_SUCH_KEY = 8, ## The store operation timed out. REQUEST_TIMEOUT = 9, - ## The operation expected a different type than provided + ## The operation expected a different type than provided. TYPE_CLASH = 10, ## The data value cannot be used to carry out the desired operation. INVALID_DATA = 11, @@ -181,7 +181,7 @@ export { ## Listen for remote connections. ## ## a: an address string on which to accept connections, e.g. - ## "127.0.0.1". An empty string refers to @p INADDR_ANY. + ## "127.0.0.1". An empty string refers to INADDR_ANY. ## ## p: the TCP port to listen on. The value 0 means that the OS should choose ## the next available free port. @@ -229,9 +229,13 @@ export { ## TODO: We do not have a function yet to terminate a connection. global unpeer: function(a: string, p: port): bool; + ## Get a list of all peer connections. + ## ## Returns: a list of all peer connections. global peers: function(): vector of PeerInfo; + ## Get a unique identifier for the local broker endpoint. + ## ## Returns: a unique identifier for the local broker endpoint. global node_id: function(): string; @@ -268,7 +272,8 @@ export { global unsubscribe: function(topic_prefix: string): bool; ## Automatically send an event to any interested peers whenever it is - ## locally dispatched (e.g. using "event my_event(...);" in a script). + ## locally dispatched. (For example, using "event my_event(...);" in a + ## script.) ## ## topic: a topic string associated with the event message. ## Peers advertise interest by registering a subscription to some diff --git a/scripts/base/frameworks/broker/store.bro b/scripts/base/frameworks/broker/store.bro index 75b7d69b35..2e216afa93 100644 --- a/scripts/base/frameworks/broker/store.bro +++ b/scripts/base/frameworks/broker/store.bro @@ -59,7 +59,7 @@ export { ## Options to tune the RocksDB storage backend. type RocksDBOptions: record { ## File system path of the database. - ## If left empty, will be derived from the name of the store. + ## If left empty, will be derived from the name of the store, ## and use the '.rocksdb' file suffix. path: string &default = ""; }; @@ -125,9 +125,13 @@ export { ## longer be used for data store operations. global close: function(h: opaque of Broker::Store): bool; - ## Returns: whether a store is closed or not. + ## Check if a store is closed or not. + ## + ## Returns: true if the store is closed. global is_closed: function(h: opaque of Broker::Store): bool; + ## Get the name of a store. + ## ## Returns: the name of the store. global store_name: function(h: opaque of Broker::Store): string; diff --git a/scripts/base/frameworks/cluster/pools.bro b/scripts/base/frameworks/cluster/pools.bro index 69b6c7128e..fb45594adc 100644 --- a/scripts/base/frameworks/cluster/pools.bro +++ b/scripts/base/frameworks/cluster/pools.bro @@ -1,5 +1,5 @@ ##! Defines an interface for managing pools of cluster nodes. Pools are -##! are useful way to distribute work or data among nodes within a cluster. +##! a useful way to distribute work or data among nodes within a cluster. @load ./main @load base/utils/hash_hrw @@ -7,7 +7,7 @@ module Cluster; export { - ## Store state of a cluster within within the context of a work pool. + ## Store state of a cluster within the context of a work pool. type PoolNode: record { ## The node name (e.g. "manager"). name: string; diff --git a/src/broker/messaging.bif b/src/broker/messaging.bif index c7b16dba72..bc0d03a629 100644 --- a/src/broker/messaging.bif +++ b/src/broker/messaging.bif @@ -304,7 +304,7 @@ type Cluster::Pool: record; ## Publishes an event to a node within a pool according to Round-Robin ## distribution strategy. ## -## pool: the pool of nodes that are eligible to receive the revent +## 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 @@ -350,7 +350,7 @@ function Cluster::publish_rr%(pool: Pool, key: string, ...%): bool ## node, then automatically forwards it to its peers with a different topic. ## The event is relayed at most a single hop. ## -## pool: the pool of nodes that are eligible to receive the event +## 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 @@ -423,7 +423,7 @@ function Cluster::relay_rr%(pool: Pool, key: any, ...%): bool ## Publishes an event to a node within a pool according to Rendezvous ## (Highest Random Weight) hashing strategy. ## -## pool: the pool of nodes that are eligible to receive the revent +## 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. @@ -467,7 +467,7 @@ function Cluster::publish_hrw%(pool: Pool, key: any, ...%): bool ## strategy. The receiving nodes then automatically forwards it to its peers ## with a different topic. The event is relayed at most a single hop. ## -## pool: the pool of nodes that are eligible to receive the revent +## 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.