Packages
ex_sorcery
0.1.0
A toolkit for building event-driven applications in Elixir with event sourcing and CQRS patterns
Current section
Files
Jump to
Current section
Files
lib/sorcery/pub_sub/behavior.ex
defmodule Sorcery.PubSub.Behaviour do
@callback subscribe() :: :ok | {:error, term()}
@callback subscribe(subscription :: term(), opts :: Keyword.t()) :: {:ok, pid()} | {:error, term()}
@callback publish(events :: term()) :: :ok
@callback start(opts :: Keyword.t()) :: {:ok, pid()} | {:error, term()}
@type subscription :: %{
domain: String.t(),
instance_id: String.t()
}
end