yggdrasil v3.0.2 Yggdrasil.Distributor.Backend

Distributor backend to subscribe, unsubscribe and publish messages. Uses Phoenix.PubSub for message distribution.

Published messages comes in the form of {:Y_EVENT, Channel.t(), term()}.

Summary

Functions

Publishes a message in a channel

Subscribes to a channel

Unsubscribes from a channel

Functions

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

Publishes a message in a channel.

subscribe(channel)
subscribe(Yggdrasil.Channel.t) :: :ok | {:error, term}

Subscribes to a channel.

unsubscribe(channel)
unsubscribe(Yggdrasil.Channel.t) :: :ok | {:error, term}

Unsubscribes from a channel.