wabbit v0.4.0 Wabbit.GenStage behaviour View Source
Link to this section Summary
Types
The supported consume options
The supported init options
The supported consume options
The supported stage types
Link to this section Types
The supported consume options
The supported init options
The supported consume options
The supported stage types.
Link to this section Functions
Link to this section Callbacks
Link to this callback
code_change(old_vsn, state, extra)
View Source
code_change(old_vsn, state :: term, extra :: term) ::
{:ok, new_state :: term} |
{:error, reason :: term} when old_vsn: term | {:down, term}
Link to this callback
format_status(arg0, list)
View Source
(optional)
format_status(:normal | :terminate, [pdict :: {term, term} | state :: term, ...]) :: status :: term
Link to this callback
handle_call(request, arg1, state)
View Source
handle_call(request :: term, GenServer.from, state :: term) :: {:reply, reply, [event], new_state} | {:reply, reply, [event], new_state, :hibernate} | {:noreply, [event], new_state} | {:noreply, [event], new_state, :hibernate} | {:stop, reason, reply, new_state} | {:stop, reason, new_state} when reply: term, new_state: term, reason: term, event: term
Link to this callback
handle_cancel({}, arg1, state)
View Source
handle_cancel({:cancel | :down, reason :: term}, GenServer.from, state :: term) ::
{:noreply, [event], new_state} |
{:noreply, [event], new_state, :hibernate} |
{:stop, reason, new_state} when event: term, new_state: term, reason: term
Link to this callback
handle_cast(request, state)
View Source
handle_cast(request :: term, state :: term) ::
{:noreply, [event], new_state} |
{:noreply, [event], new_state, :hibernate} |
{:stop, reason :: term, new_state} when new_state: term, event: term
Link to this callback
handle_channel_opened(channel, state)
View Source
handle_channel_opened(channel :: pid, state :: term) ::
{:ok, new_state} |
{:ok, new_state, publish_options} |
{:ok, queue, new_state} |
{:ok, queue, new_state, consume_options} when new_state: term, queue: binary
Link to this callback
handle_decode(payload, meta, state)
View Source
handle_decode(payload :: binary, meta :: map, state :: term) ::
{:ok, message :: any, new_state} |
{:error, reason, new_state :: any} when new_state: term, reason: term
Link to this callback
handle_demand(demand, state)
View Source
(optional)
handle_demand(demand :: pos_integer, state :: term) ::
{:noreply, [event], new_state} |
{:noreply, [event], new_state, :hibernate} |
{:stop, reason, new_state} when new_state: term, reason: term, event: term
Link to this callback
handle_encode(message, state)
View Source
handle_encode(message :: term, state :: term) ::
{:ok, payload, new_state} |
{:ok, payload, new_state, publish_options} |
{:error, reason, new_state :: any} when new_state: term, reason: term, payload: binary
Link to this callback
handle_events(list, arg1, state)
View Source
(optional)
handle_events([event], GenServer.from, state :: term) :: {:noreply, [event], new_state} | {:noreply, [event], new_state, :hibernate} | {:stop, reason, new_state} when new_state: term, reason: term, event: term
Link to this callback
handle_info(msg, state)
View Source
handle_info(msg :: term, state :: term) ::
{:noreply, [event], new_state} |
{:noreply, [event], new_state, :hibernate} |
{:stop, reason :: term, new_state} when new_state: term, event: term
Link to this callback
handle_subscribe(arg0, opts, to_or_from, state)
View Source
handle_subscribe(:producer | :consumer, opts :: [options], to_or_from :: GenServer.from, state :: term) :: {:automatic | :manual, new_state} | {:stop, reason, new_state} when new_state: term, reason: term
Link to this callback
terminate(reason, state)
View Source
terminate(reason, state :: term) :: term when reason: :normal | :shutdown | {:shutdown, term} | term