ForgeSdk v0.39.0 ForgeSdk.Queue protocol View Source

Queue protocol.

Link to this section Summary

Functions

Add an item into the queue

Check if queue contains an item

Check if the queue is full

Initialize a queue

Remove an item from the queue, return a tuple including a removed item and a queue

Get the first matched item from the queue and remove it from the queue based on fifo

Return the length of the queue

Link to this section Types

Link to this section Functions

Add an item into the queue.

Link to this function

contains?(queue, item) View Source
contains?(t(), Google.Protobuf.Any.t()) :: boolean()

Check if queue contains an item.

Check if the queue is full.

Link to this function

init(queue, opts \\ []) View Source
init(t(), Keyword.t()) :: t()

Initialize a queue.

Remove an item from the queue, return a tuple including a removed item and a queue.

Link to this function

remove(queue, key, value) View Source
remove(t(), atom(), binary()) :: t()

Get the first matched item from the queue and remove it from the queue based on fifo.

Return the length of the queue.