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
- Queue::Queue
- Type
-
initialized:
bool
&default
=F
&optional
vals:
table
[count
] ofany
&optional
settings:
Queue::Settings
&optional
top:
count
&default
=0
&optional
The internal data structure for the queue.
- Queue::Settings
- Type
Settings for initializing the queue.
Functions
- Queue::get
- Type
function
(q:Queue::Queue
) :any
Get a value from the end of a queue.
- Parameters
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.
- Parameters
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.
- Parameters
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.
- Parameters
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.
- Parameters
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.
- Parameters
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.
- Parameters
q – The queue to put the value into.
val – The value to insert into the queue.