View Source Yggdrasil.Subscriber.Manager (Yggdrasil v6.0.2)
Manages subscription to a channel.
Link to this section Summary
Functions
Adds a pid
to the channel
.
Returns a specification to start this module under a supervisor.
Reports the connection of the adapter.
Reports the disconnection of the adapter.
Removes a pid
from the channel
.
Starts a manager with a channel
.
Stops a manager
with an optional reason
.
Whether the pid
is subscribed or not to the channel
.
Link to this section Types
Specs
status() :: :connected | :disconnected
Subscription status.
Link to this section Functions
Specs
add(Yggdrasil.Channel.t(), pid()) :: :ok | {:error, binary()}
Adds a pid
to the channel
.
Returns a specification to start this module under a supervisor.
See Supervisor
.
Specs
connected(Yggdrasil.Channel.t()) :: :ok | {:error, binary()}
Reports the connection of the adapter.
Specs
disconnected(Yggdrasil.Channel.t()) :: :ok | {:error, binary()}
Reports the disconnection of the adapter.
Specs
remove(Yggdrasil.Channel.t(), pid()) :: :ok | {:error, binary()}
Removes a pid
from the channel
.
Specs
start_link(Yggdrasil.Channel.t(), pid(), GenServer.options()) :: GenServer.on_start()
Starts a manager with a channel
.
Specs
stop(GenServer.name(), term()) :: :ok
Stops a manager
with an optional reason
.
Specs
subscribed?(Yggdrasil.Channel.t(), nil | pid()) :: boolean()
Whether the pid
is subscribed or not to the channel
.