Extreme.Reading (extreme v1.1.2)

View Source

Summary

Functions

read_events(base_name, params, fun)

@spec read_events(
  module(),
  Extreme.Reading.Params.t(),
  (Extreme.Messages.StreamEventAppeared.t() ->
     :ok | :stop | {:stop, response :: any()})
) ::
  :finished
  | {:stopped, response :: any()}
  | {:error, :no_stream | :stream_hard_deleted}
  | {:error, :unexpected_processing_response, any()}

reduce_events(base_name, acc, params, fun)

@spec reduce_events(
  module(),
  any(),
  Extreme.Reading.Params.t(),
  (Extreme.Messages.StreamEventAppeared.t(), acc :: any() ->
     {:ok, acc :: any()} | {:stop, acc :: any()})
) ::
  {:finished, acc :: any()}
  | {:stopped, acc :: any()}
  | {:error, :no_stream | :stream_hard_deleted}
  | {:error, :unexpected_processing_response, any()}