View Source OffBroadwayMemory.Buffer (off_broadway_memory v1.0.0)
An in-memory buffer implementation using :queue
.
Summary
Functions
Returns a specification to start this module under a supervisor.
Clear all messages from the buffer.
Get the length of the buffer.
Pop messages from the buffer.
Push messages to the buffer.
Functions
Returns a specification to start this module under a supervisor.
See Supervisor
.
@spec clear(GenServer.server()) :: :ok
Clear all messages from the buffer.
@spec length(GenServer.server()) :: non_neg_integer()
Get the length of the buffer.
@spec pop(GenServer.server(), non_neg_integer()) :: [any()]
Pop messages from the buffer.
@spec push(GenServer.server(), [any()] | any()) :: :ok
Push messages to the buffer.