base/utils/queue.zeek¶
-
Queue
¶
A FIFO queue.
- Namespace
Queue
Summary¶
Types¶
The internal data structure for the queue. |
|
Settings for initializing the queue. |
Redefinitions¶
Functions¶
Get a value from the end of a queue. |
|
Get the contents of the queue as a vector. |
|
Initialize a queue record structure. |
|
Get the number of items in a queue. |
|
Merge two queues together. |
|
Peek at the value at the end of the queue without removing it. |
|
Put a value onto the beginning of a queue. |
Detailed Interface¶
Types¶
Functions¶
-
Queue::get
¶ - Type
function
(q:Queue::Queue
) :any
Get a value from the end of a queue.
- Q
The queue to get the value from.
- Returns
The value gotten from the queue.
-
Queue::get_vector
¶ - Type
function
(q:Queue::Queue
, ret:vector
ofany
) :void
Get the contents of the queue as a vector.
- Q
The queue.
- Ret
A vector containing the current contents of the queue as the type of ret.
-
Queue::init
¶ - Type
function
(s:Queue::Settings
&default
=[]
&optional
) :Queue::Queue
Initialize a queue record structure.
- S
A record which configures the queue.
- Returns
An opaque queue record.
-
Queue::len
¶ - Type
function
(q:Queue::Queue
) :count
Get the number of items in a queue.
- Q
The queue.
- Returns
The length of the queue.
-
Queue::merge
¶ - Type
function
(q1:Queue::Queue
, q2:Queue::Queue
) :Queue::Queue
Merge two queues together. If any settings are applied to the queues, the settings from q1 are used for the new merged queue.
- Q1
The first queue. Settings are taken from here.
- Q2
The second queue.
- Returns
A new queue from merging the other two together.
-
Queue::peek
¶ - Type
function
(q:Queue::Queue
) :any
Peek at the value at the end of the queue without removing it.
- Q
The queue to get the value from.
- Returns
The value at the end of the queue.
-
Queue::put
¶ - Type
function
(q:Queue::Queue
, val:any
) :void
Put a value onto the beginning of a queue.
- Q
The queue to put the value into.
- Val
The value to insert into the queue.