Honeylixir.ResponseQueue (honeylixir v0.3.0) View Source

Available for tracking responses for each event sent via Honeylixir.Transmission.

Currently does not block when the queue is full.

Link to this section Summary

Functions

Adds a Honeylixir.Response to the queue unless max size has been reached at which point the value is dropped.

Returns a specification to start this module under a supervisor.

Takes the oldest Honeylixir.Response from the queue and returns it unless the queue is empty in which case nil is returned.

Link to this section Functions

Link to this function

add(resp, name \\ __MODULE__)

View Source

Specs

add(Honeylixir.Response.t(), atom()) :: :ok

Adds a Honeylixir.Response to the queue unless max size has been reached at which point the value is dropped.

Returns a specification to start this module under a supervisor.

See Supervisor.

Specs

pop(atom()) :: nil | Honeylixir.Response.t()

Takes the oldest Honeylixir.Response from the queue and returns it unless the queue is empty in which case nil is returned.