Yggdrasil v5.0.0 Yggdrasil.Publisher.Adapter behaviour View Source
Publisher adapter behaviour.
Link to this section Summary
Functions
Use to implement Yggdrasil.Publisher.Adapter behaviour.
Generic publisher adapter publish function. Publisher a message in a
channel using a publisher and some options.
Generic publisher adapter starter that receives a channel and an optional
GenServer options.
Generic publisher adapter stopper that receives the pid.
Link to this section Functions
__using__(_) View Source (macro)
Use to implement Yggdrasil.Publisher.Adapter behaviour.
publish(publish, channel, message, options)
View Source
publish(GenServer.server(), Yggdrasil.Channel.t(), term(), Keyword.t()) ::
:ok | {:error, term()}
publish(GenServer.server(), Yggdrasil.Channel.t(), term(), Keyword.t()) :: :ok | {:error, term()}
Generic publisher adapter publish function. Publisher a message in a
channel using a publisher and some options.
start_link(channel, options \\ [])
View Source
start_link(Yggdrasil.Channel.t(), GenServer.options()) :: GenServer.on_start()
start_link(Yggdrasil.Channel.t(), GenServer.options()) :: GenServer.on_start()
Generic publisher adapter starter that receives a channel and an optional
GenServer options.
stop(pid)
View Source
stop(GenServer.server()) :: :ok
stop(GenServer.server()) :: :ok
Generic publisher adapter stopper that receives the pid.
Link to this section Callbacks
publish(publisher, channel, message)
View Source
publish(
publisher :: GenServer.server(),
channel :: Yggdrasil.Channel.t(),
message :: term()
) :: :ok | {:error, term()}
publish( publisher :: GenServer.server(), channel :: Yggdrasil.Channel.t(), message :: term() ) :: :ok | {:error, term()}
Callback for publishing a message in a channel using a publisher.
publish(publisher, channel, message, options)
View Source
publish(
publisher :: GenServer.server(),
channel :: Yggdrasil.Channel.t(),
message :: term(),
options :: Keyword.t()
) :: :ok | {:error, term()}
publish( publisher :: GenServer.server(), channel :: Yggdrasil.Channel.t(), message :: term(), options :: Keyword.t() ) :: :ok | {:error, term()}
Publishes a message in a channel using a publisher and some options.
start_link(namespace, options)
View Source
start_link(namespace :: atom(), options :: GenServer.options()) ::
GenServer.on_start()
start_link(namespace :: atom(), options :: GenServer.options()) :: GenServer.on_start()
Callback to start a publisher with a namespace and some GenServer
options.