View Source Yggdrasil.Publisher.Adapter behaviour (Yggdrasil v6.0.2)

Publisher adapter behaviour.

Link to this section Summary

Callbacks

Callback for publishing a message in a channel using a publisher.

Publishes a message in a channel using a publisher and some options.

Callback to start a publisher with a namespace and some GenServer options.

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 Callbacks

Link to this callback

publish( publisher, channel, message )

View Source

Specs

publish(
  publisher :: GenServer.server(),
  channel :: Yggdrasil.Channel.t(),
  message :: term()
) :: :ok | {:error, term()}

Callback for publishing a message in a channel using a publisher.

Link to this callback

publish( publisher, channel, message, options )

View Source

Specs

publish(
  publisher :: GenServer.server(),
  channel :: Yggdrasil.Channel.t(),
  message :: term(),
  options :: keyword()
) :: :ok | {:error, term()}

Publishes a message in a channel using a publisher and some options.

Link to this callback

start_link( namespace, options )

View Source

Specs

start_link(
  namespace :: atom(),
  options :: GenServer.options()
) :: GenServer.on_start()

Callback to start a publisher with a namespace and some GenServer options.

Link to this section Functions

Use to implement Yggdrasil.Publisher.Adapter behaviour.

Link to this function

publish(publish, channel, message, options)

View Source

Specs

publish(GenServer.server(), Yggdrasil.Channel.t(), term(), keyword()) ::
  :ok | {:error, term()}

Generic publisher adapter publish function. Publisher a message in a channel using a publisher and some options.

Link to this function

start_link(channel, options \\ [])

View Source

Specs

Generic publisher adapter starter that receives a channel and an optional GenServer options.

Specs

stop(GenServer.server()) :: :ok

Generic publisher adapter stopper that receives the pid.