Extreme behaviour (extreme v1.1.1)
View SourceTODO
Summary
Callbacks
Spawns a persistent subscription.
Pings connected EventStore and should return :pong
back.
Types
@type t() :: module()
Callbacks
@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/2
s in the shape of {:on_event, event, correlation_id}
.
See Extreme.PersistentSubscription
for full details.
TODO
@callback ping() :: :pong
Pings connected EventStore and should return :pong
back.
@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
@callback start_link(config :: Keyword.t(), opts :: Keyword.t()) :: {:ok, pid()} | {:error, {:already_started, pid()}} | {:error, term()}
TODO
@callback subscribe_to(stream :: String.t(), subscriber :: pid(), opts :: Keyword.t()) :: {:ok, pid()}
TODO
@callback unsubscribe(subscription :: pid()) :: :ok
TODO