mirror of
https://github.com/zeek/zeek.git
synced 2025-10-15 04:58:21 +00:00
Update comments in script files, run zeek-format on all of them
This commit is contained in:
parent
d0741c8001
commit
f40947f6ac
5 changed files with 104 additions and 77 deletions
|
@ -23,8 +23,9 @@ export {
|
|||
## Returns: A record containing the status of the operation, and either an error
|
||||
## string on failure or a value on success. The value returned here will
|
||||
## be an ``opaque of BackendHandle``.
|
||||
global open_backend: function(btype: Storage::Backend, options: Storage::BackendOptions, key_type: any,
|
||||
val_type: any): Storage::OperationResult;
|
||||
global open_backend: function(btype: Storage::Backend,
|
||||
options: Storage::BackendOptions, key_type: any, val_type: any)
|
||||
: Storage::OperationResult;
|
||||
|
||||
## Closes an existing backend connection.
|
||||
##
|
||||
|
@ -32,18 +33,20 @@ export {
|
|||
##
|
||||
## Returns: A record containing the status of the operation and an optional error
|
||||
## string for failures.
|
||||
global close_backend: function(backend: opaque of Storage::BackendHandle): Storage::OperationResult;
|
||||
global close_backend: function(backend: opaque of Storage::BackendHandle)
|
||||
: Storage::OperationResult;
|
||||
|
||||
## Inserts a new entry into a backend.
|
||||
##
|
||||
## backend: A handle to a backend connection.
|
||||
##
|
||||
## args: A :zeek:see:`Storage::PutArgs` record containing the arguments for the
|
||||
## operation.
|
||||
## operation.
|
||||
##
|
||||
## Returns: A record containing the status of the operation and an optional error
|
||||
## string for failures.
|
||||
global put: function(backend: opaque of Storage::BackendHandle, args: Storage::PutArgs): Storage::OperationResult;
|
||||
global put: function(backend: opaque of Storage::BackendHandle,
|
||||
args: Storage::PutArgs): Storage::OperationResult;
|
||||
|
||||
## Gets an entry from the backend.
|
||||
##
|
||||
|
@ -54,8 +57,9 @@ export {
|
|||
## Returns: A record containing the status of the operation, an optional error
|
||||
## string for failures, and an optional value for success. The value
|
||||
## returned here will be of the type passed into
|
||||
## :zeek:see:`Storage::open_backend`.
|
||||
global get: function(backend: opaque of Storage::BackendHandle, key: any): Storage::OperationResult;
|
||||
## :zeek:see:`Storage::Sync::open_backend`.
|
||||
global get: function(backend: opaque of Storage::BackendHandle, key: any)
|
||||
: Storage::OperationResult;
|
||||
|
||||
## Erases an entry from the backend.
|
||||
##
|
||||
|
@ -65,31 +69,37 @@ export {
|
|||
##
|
||||
## Returns: A record containing the status of the operation and an optional error
|
||||
## string for failures.
|
||||
global erase: function(backend: opaque of Storage::BackendHandle, key: any): Storage::OperationResult;
|
||||
global erase: function(backend: opaque of Storage::BackendHandle, key: any)
|
||||
: Storage::OperationResult;
|
||||
}
|
||||
|
||||
function open_backend(btype: Storage::Backend, options: Storage::BackendOptions, key_type: any,
|
||||
val_type: any): Storage::OperationResult
|
||||
{
|
||||
function open_backend(btype: Storage::Backend, options: Storage::BackendOptions,
|
||||
key_type: any, val_type: any): Storage::OperationResult
|
||||
{
|
||||
return Storage::Sync::__open_backend(btype, options, key_type, val_type);
|
||||
}
|
||||
}
|
||||
|
||||
function close_backend(backend: opaque of Storage::BackendHandle): Storage::OperationResult
|
||||
{
|
||||
function close_backend(backend: opaque of Storage::BackendHandle)
|
||||
: Storage::OperationResult
|
||||
{
|
||||
return Storage::Sync::__close_backend(backend);
|
||||
}
|
||||
}
|
||||
|
||||
function put(backend: opaque of Storage::BackendHandle, args: Storage::PutArgs): Storage::OperationResult
|
||||
{
|
||||
return Storage::Sync::__put(backend, args$key, args$value, args$overwrite, args$expire_time);
|
||||
}
|
||||
function put(backend: opaque of Storage::BackendHandle, args: Storage::PutArgs)
|
||||
: Storage::OperationResult
|
||||
{
|
||||
return Storage::Sync::__put(backend, args$key, args$value, args$overwrite,
|
||||
args$expire_time);
|
||||
}
|
||||
|
||||
function get(backend: opaque of Storage::BackendHandle, key: any): Storage::OperationResult
|
||||
{
|
||||
function get(backend: opaque of Storage::BackendHandle, key: any)
|
||||
: Storage::OperationResult
|
||||
{
|
||||
return Storage::Sync::__get(backend, key);
|
||||
}
|
||||
}
|
||||
|
||||
function erase(backend: opaque of Storage::BackendHandle, key: any): Storage::OperationResult
|
||||
{
|
||||
function erase(backend: opaque of Storage::BackendHandle, key: any)
|
||||
: Storage::OperationResult
|
||||
{
|
||||
return Storage::Sync::__erase(backend, key);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue