event v0.2.0 Event.Sink behaviour
Final stage in an Event processing chain. Receives events from an Event.Source or Event.Processor and performs any final processing on them.
Link to this section Summary
Functions
Send a message to the event processor and await a response.
Send an asynchronous message to the event processor
Handle a code change
Handle a synchronous event notification
Handle an asynchronous event notification
Handle incoming events
Handle an incoming message
Handle a subscription
Initialize event processor state
Start an EventSink process.
Handle process termination
Link to this section Types
from()
from() :: {pid(), subscription_tag()}
from() :: {pid(), subscription_tag()}
subscription_tag() (opaque)
Link to this section Functions
call(processor, call, timeout \\ 5000)
Send a message to the event processor and await a response.
cast(processor, cast)
Send an asynchronous message to the event processor
code_change(old_version, state, extra)
Handle a code change
handle_call(call, from, state)
Handle a synchronous event notification
handle_cast(call, state)
Handle an asynchronous event notification
handle_events(events, from, state)
Handle incoming events
handle_info(info, state)
Handle an incoming message
handle_subscribe(subscriber, opts, from, state)
Handle a subscription
init(opts)
Initialize event processor state
start_link(module, args, opts)
Start an EventSink process.
terminate(reason, arg2)
Handle process termination
Link to this section Callbacks
code_change(old_vsn, state, extra) (optional)
handle_call(request, from, state)
(optional)
handle_call(request :: term(), from :: GenServer.from(), state :: term()) ::
{:reply, reply, new_state}
| {:reply, reply, [event], new_state}
| {:reply, reply, [event], new_state, :hibernate}
| {:noreply, new_state}
| {: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()
handle_call(request :: term(), from :: GenServer.from(), state :: term()) :: {:reply, reply, new_state} | {:reply, reply, [event], new_state} | {:reply, reply, [event], new_state, :hibernate} | {:noreply, new_state} | {: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()