Extreme behaviour (extreme v1.0.1) View Source

TODO

Link to this section Summary

Link to this section Types

Link to this section Callbacks

Link to this callback

connect_to_persistent_subscription(subscriber, stream, group, allowed_in_flight_messages)

View Source

Specs

connect_to_persistent_subscription(
  subscriber :: pid(),
  stream :: String.t(),
  group :: String.t(),
  allowed_in_flight_messages :: integer()
) :: {:ok, pid()}

Spawns a persistent subscription.

The persistent subscription will send events to the subscriber process in the form of GenServer.cast/2s in the shape of {:on_event, event, correlation_id}.

See Extreme.PersistentSubscription for full details.

Link to this callback

execute(message, correlation_id, timeout)

View Source

Specs

execute(message :: term(), correlation_id :: binary(), timeout :: integer()) ::
  term()

TODO

Specs

ping() :: :pong

Pings connected EventStore and should return :pong back.

Link to this callback

read_and_stay_subscribed(stream, subscriber, from_event_number, per_page, resolve_link_tos, require_master)

View Source

Specs

read_and_stay_subscribed(
  stream :: String.t(),
  subscriber :: pid(),
  from_event_number :: integer(),
  per_page :: integer(),
  resolve_link_tos :: boolean(),
  require_master :: boolean()
) :: {:ok, pid()}

TODO

Link to this callback

start_link(config, opts)

View Source

Specs

start_link(config :: Keyword.t(), opts :: Keyword.t()) ::
  {:ok, pid()} | {:error, {:already_started, pid()}} | {:error, term()}

TODO

Link to this callback

subscribe_to(stream, subscriber, opts)

View Source

Specs

subscribe_to(stream :: String.t(), subscriber :: pid(), opts :: Keyword.t()) ::
  {:ok, pid()}

TODO

Link to this callback

unsubscribe(subscription)

View Source

Specs

unsubscribe(subscription :: pid()) :: :unsubscribed

TODO