redix_stream v0.2.1 Redix.Stream.Consumer
A Server which handle a single connection to a redix stream.
Link to this section Summary
Functions
Returns child specification when used with a supervisor
Handles a new message from a stream, dispatching it to the given handler
Initializes a new Redix.Stream.Consumer
, establishing a long-term stream
with the given redis
server
Starts a new GenServer of Redix.Stream.Consumer
Link to this section Types
Link to this type
state()
state() :: %{ redix: Redix.Stream.redix(), stream: Redix.Stream.t(), group_name: group_name(), consumer_name: consumer_name(), handler: function() | Redix.Stream.handler(), process_pending: boolean(), raise_errors: boolean() }
Link to this section Functions
Link to this function
child_spec(arg)
child_spec( {Redix.Stream.redix(), Redix.Stream.t(), function() | Redix.Stream.handler(), keyword()} ) :: Supervisor.child_spec()
Returns child specification when used with a supervisor.
Link to this function
handle_info(arg, state)
Handles a new message from a stream, dispatching it to the given handler.
Link to this function
init(arg)
init( {Redix.Stream.redix(), Redix.Stream.t(), function() | Redix.Stream.handler(), keyword()} ) :: {:ok, state()}
Initializes a new Redix.Stream.Consumer
, establishing a long-term stream
with the given redis
server.
Link to this function
start_link(redix, stream, handler, opts \\ [])
start_link( Redix.Stream.redix(), Redix.Stream.t(), function() | Redix.Stream.handler(), keyword() ) :: GenServer.on_start()
Starts a new GenServer of Redix.Stream.Consumer
.
Link to this function
terminate(reason, state)