Jorb v0.2.0 Jorb.Backend behaviour View Source

The backend behavior represents a queueing abstraction.

Jorb requires four functions to be defined for a backend: setup/1, enqueue/2, c:dequeue/1, and finalize/2

Setup handles anything to create the underlying queue Enqueue pushes a message on to the queue Dequeue pulls the next message from the queue Finalize removes the given message from the queue

Link to this section Summary

Link to this section Callbacks

Link to this callback enqueue(arg0, arg1) View Source
enqueue(String.t(), Map.t()) :: {:ok, Map.t()} | {:error, any()}
Link to this callback finalize(arg0, arg1) View Source
finalize(String.t(), Map.t()) :: :ok | {:error, any()}
Link to this callback pull(arg0) View Source
pull(String.t()) :: {:ok, [Map.t()]} | {:error, any()}
Link to this callback purge(arg0) View Source
purge(String.t()) :: :ok | {:error, any()}