Queue.Agent (queue v0.1.2) View Source

Agent for work with queue

Link to this section Summary

Functions

Returns a specification to start this module under a supervisor.

Inside element in queue

Outside element of queue

Link to this section Functions

Returns a specification to start this module under a supervisor.

See Supervisor.

Specs

inside(any()) :: :ok

Inside element in queue

Examples:

iex> {:ok, _pid} = Queue.Agent.start_link(nil)
iex> Queue.Agent.inside("first")
:ok
iex> Queue.Agent.out()
"first"

Specs

out() :: any()

Outside element of queue

Examples:

iex> {:ok, _pid} = Queue.Agent.start_link(nil)
iex> Queue.Agent.inside("first")
:ok
iex> Queue.Agent.out()
"first"
Link to this function

start_link(initial_state)

View Source