dawdle v0.5.1 Dawdle.Backend behaviour View Source

Behaviour for Dawdle backends.

Dawdle backends are responsible for interfacing with the actual message queue.

Link to this section Summary

Functions

Returns an initialized backend.

Link to this section Types

Link to this type

recv_message() View Source
recv_message() :: map()

Link to this type

send_message() View Source
send_message() :: binary()

Link to this section Functions

Returns an initialized backend.

Looks up the preferred backend in the application environment and calls the backend's init/0 callback.

Link to this section Callbacks

Link to this callback

delete(queue, list) View Source
delete(queue(), [recv_message()]) :: :ok

Link to this callback

recv(queue) View Source
recv(queue()) :: {:ok, [recv_message()]} | {:error, term()}

Link to this callback

send(list) View Source
send([send_message()]) :: :ok | {:error, term()}

Link to this callback

send_after(send_message, delay_secs) View Source
send_after(send_message(), delay_secs()) :: :ok | {:error, term()}