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