gen_queue v0.1.8 GenQueue.Adapter behaviour View Source
A behaviour module for implementing queue adapters.
Link to this section Summary
Callbacks
Removes all items from a queue
Gets the number of items in a queue
Pops an item from a queue
Pushes an item to a queue
Link to this section Types
Link to this section Callbacks
Link to this callback
handle_flush(gen_queue, opts)
View Source
handle_flush(gen_queue :: GenQueue.t(), opts :: Keyword.t()) :: {:ok, integer()} | {:error, any()}
Removes all items from a queue
Link to this callback
handle_length(gen_queue, opts)
View Source
handle_length(gen_queue :: GenQueue.t(), opts :: Keyword.t()) :: {:ok, integer()} | {:error, any()}
Gets the number of items in a queue
Link to this callback
handle_pop(gen_queue, opts)
View Source
handle_pop(gen_queue :: GenQueue.t(), opts :: Keyword.t()) :: {:ok, any()} | {:error, any()}
Pops an item from a queue
Link to this callback
handle_push(gen_queue, item, opts)
View Source
handle_push(gen_queue :: GenQueue.t(), item :: any(), opts :: Keyword.t()) :: {:ok, any()} | {:error, any()}
Pushes an item to a queue
Link to this callback
start_link(gen_queue, opts)
View Source
start_link(gen_queue :: GenQueue.t(), opts :: Keyword.t()) :: GenServer.on_start()