mirror of
https://github.com/zeek/zeek.git
synced 2025-10-14 20:48:21 +00:00
Make backend options a record, move actual options to be sub-records
This commit is contained in:
parent
64f3969434
commit
a485b1d237
23 changed files with 71 additions and 73 deletions
|
@ -17,9 +17,13 @@ type StorageDummyOpts : record {
|
|||
open_fail: bool;
|
||||
};
|
||||
|
||||
redef record Storage::BackendOptions += {
|
||||
dummy: StorageDummyOpts &optional;
|
||||
};
|
||||
|
||||
event zeek_init() {
|
||||
local opts : StorageDummyOpts;
|
||||
opts$open_fail = F;
|
||||
local opts : Storage::BackendOptions;
|
||||
opts$dummy = [$open_fail = F];
|
||||
|
||||
local key = "key1234";
|
||||
local value = "value5678";
|
||||
|
@ -49,7 +53,7 @@ event zeek_init() {
|
|||
get_res?$val, put_res, erase_res));
|
||||
|
||||
# Test failing to open the handle and test closing an invalid handle.
|
||||
opts$open_fail = T;
|
||||
opts$dummy$open_fail = T;
|
||||
local b2 = Storage::Sync::open_backend(Storage::STORAGEDUMMY, opts, str, str);
|
||||
Storage::Sync::close_backend(b2);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue