> On Oct 10, 2017, at 2:10 PM, Johanna Amann <joha...@icir.org> wrote:
> 
> it - after you set up a store with Broker::InitStore, how do you interact
> with Software::tracked_store?

Probably best to look at this Broker script API:

https://github.com/bro/bro/blob/topic/actor-system/scripts/base/frameworks/broker/store.bro

e.g. you have get/push/etc. operations you can do on it, like this example:

https://github.com/bro/bro/blob/topic/actor-system/testing/btest/broker/store/ops.bro

> I am especially curious how this handles the strong typing of Bro.

All data in stores are an opaque Data type and the store operations (e.g. from 
API in link above) implicitly convert Bro types into that type.

Then when retrieving data from a store, to convert Data to Bro values, you can 
use new ‘is’ or ‘as’ operators or a new type-based-switch-statement.  Example:

https://github.com/bro/bro/blob/topic/actor-system/testing/btest/broker/store/type-conversion.bro

- Jon

_______________________________________________
bro-dev mailing list
bro-dev@bro.org
http://mailman.icsi.berkeley.edu/mailman/listinfo/bro-dev

Reply via email to