View Source Extreme behaviour (extreme v1.0.3)

TODO

Summary

Types

Callbacks

Link to this callback

connect_to_persistent_subscription(subscriber, stream, group, allowed_in_flight_messages)

View Source
@callback 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
@callback execute(message :: term(), correlation_id :: binary(), timeout :: integer()) ::
  term()

TODO

@callback 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
@callback 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
@callback 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
@callback subscribe_to(stream :: String.t(), subscriber :: pid(), opts :: Keyword.t()) ::
  {:ok, pid()}

TODO

Link to this callback

unsubscribe(subscription)

View Source
@callback unsubscribe(subscription :: pid()) :: :unsubscribed

TODO