mirror of
https://github.com/zeek/zeek.git
synced 2025-10-08 09:38:19 +00:00
Pass key/value types for validation when opening backends
This commit is contained in:
parent
2ea0f3e70a
commit
69d940533d
10 changed files with 100 additions and 54 deletions
|
@ -23,12 +23,17 @@ public:
|
|||
* Opens a new storage backend.
|
||||
*
|
||||
* @param type The tag for the type of backend being opened.
|
||||
* @param options A record val representing the configuration for this
|
||||
* type of backend.
|
||||
* @return A pair containing a pointer to a backend and a string for
|
||||
* returning error messages if needed.
|
||||
* @param options A record val representing the configuration for this type of
|
||||
* backend.
|
||||
* @param key_type The script-side type of the keys stored in the backend. Used for
|
||||
* validation of types.
|
||||
* @param val_type The script-side type of the values stored in the backend. Used for
|
||||
* validation of types and conversion during retrieval.
|
||||
* @return An optional value potentially containing an error string if needed. Will be
|
||||
* unset if the operation succeeded.
|
||||
*/
|
||||
zeek::expected<BackendPtr, std::string> OpenBackend(const Tag& type, RecordValPtr options);
|
||||
zeek::expected<BackendPtr, std::string> OpenBackend(const Tag& type, RecordValPtr options, TypePtr key_type,
|
||||
TypePtr val_type);
|
||||
|
||||
/**
|
||||
* Closes a storage backend.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue