BrokerStore<->Zeek table - introdude &backend attribute

The &backend attribute allows for a much more convenient way of
interacting with brokerstores. One does not need to create a broker
store anymore - instead all of this is done internally.

The current state of this partially works. This should work fine for
persistence - but clones are currently not yet correctly attached.
This commit is contained in:
Johanna Amann 2020-06-30 16:33:52 -07:00
parent 43d2289754
commit 318a72c303
10 changed files with 187 additions and 3 deletions

View file

@ -25,6 +25,10 @@ export {
## A negative/zero value indicates to never buffer commands.
const default_clone_mutation_buffer_interval = 2min &redef;
const auto_store_master = T &redef;
const auto_store_db_directory = "." &redef;
## Whether a data store query could be completed or not.
type QueryStatus: enum {
SUCCESS,

View file

@ -249,6 +249,10 @@ export {
global nodeid_topic: function(id: string): string;
}
@if ( Cluster::is_enabled() && Cluster::local_node_type() != Cluster::MANAGER ) )
redef Broker::store_master = T;
@endif
global active_worker_ids: set[string] = set();
type NamedNode: record {