:tocdepth: 3

base/frameworks/broker/store.bro
================================
.. bro:namespace:: Broker

Various data structure definitions for use with Bro's communication system.

:Namespace: Broker
:Imports: :doc:`base/bif/data.bif.bro </scripts/base/bif/data.bif.bro>`, :doc:`base/bif/store.bif.bro </scripts/base/bif/store.bif.bro>`, :doc:`base/frameworks/broker/main.bro </scripts/base/frameworks/broker/main.bro>`
:Source File: :download:`/scripts/base/frameworks/broker/store.bro`

Summary
~~~~~~~
Types
#####
====================================================== ================================================================
:bro:type:`Broker::BackendOptions`: :bro:type:`record` Options to tune the particular storage backends.
:bro:type:`Broker::BackendType`: :bro:type:`enum`      Enumerates the possible storage backends.
:bro:type:`Broker::ExpiryTime`: :bro:type:`record`     An expiry time for a key-value pair inserted in to a data store.
:bro:type:`Broker::QueryResult`: :bro:type:`record`    The result of a data store query.
:bro:type:`Broker::QueryStatus`: :bro:type:`enum`      Whether a data store query could be completed or not.
:bro:type:`Broker::RocksDBOptions`: :bro:type:`record` Options to tune the RocksDB storage backend.
:bro:type:`Broker::SQLiteOptions`: :bro:type:`record`  Options to tune the SQLite storage backend.
====================================================== ================================================================


Detailed Interface
~~~~~~~~~~~~~~~~~~
Types
#####
.. bro:type:: Broker::BackendOptions

   :Type: :bro:type:`record`

      sqlite: :bro:type:`Broker::SQLiteOptions` :bro:attr:`&default` = ``[path=store.sqlite]`` :bro:attr:`&optional`

      rocksdb: :bro:type:`Broker::RocksDBOptions` :bro:attr:`&default` = ``[path=store.rocksdb]`` :bro:attr:`&optional`

   Options to tune the particular storage backends.

.. bro:type:: Broker::BackendType

   :Type: :bro:type:`enum`

      .. bro:enum:: Broker::MEMORY Broker::BackendType

      .. bro:enum:: Broker::SQLITE Broker::BackendType

      .. bro:enum:: Broker::ROCKSDB Broker::BackendType

   Enumerates the possible storage backends.

.. bro:type:: Broker::ExpiryTime

   :Type: :bro:type:`record`

      absolute: :bro:type:`time` :bro:attr:`&optional`
         Absolute point in time at which to expire the entry.

      since_last_modification: :bro:type:`interval` :bro:attr:`&optional`
         A point in time relative to the last modification time at which
         to expire the entry.  New modifications will delay the expiration.

   An expiry time for a key-value pair inserted in to a data store.

.. bro:type:: Broker::QueryResult

   :Type: :bro:type:`record`

      status: :bro:type:`Broker::QueryStatus`
         Whether the query completed or not.

      result: :bro:type:`Broker::Data`
         The result of the query.  Certain queries may use a particular
         data type (e.g. querying store size always returns a count, but
         a lookup may return various data types).

   The result of a data store query.

.. bro:type:: Broker::QueryStatus

   :Type: :bro:type:`enum`

      .. bro:enum:: Broker::SUCCESS Broker::QueryStatus

      .. bro:enum:: Broker::FAILURE Broker::QueryStatus

   Whether a data store query could be completed or not.

.. bro:type:: Broker::RocksDBOptions

   :Type: :bro:type:`record`

      path: :bro:type:`string` :bro:attr:`&default` = ``"store.rocksdb"`` :bro:attr:`&optional`
         File system path of the database.

   Options to tune the RocksDB storage backend.

.. bro:type:: Broker::SQLiteOptions

   :Type: :bro:type:`record`

      path: :bro:type:`string` :bro:attr:`&default` = ``"store.sqlite"`` :bro:attr:`&optional`
         File system path of the database.

   Options to tune the SQLite storage backend.


