Yggdrasil v5.0.0 Yggdrasil.Subscriber.Publisher View Source
A server to distribute the messages.
Link to this section Summary
Functions
Returns a specification to start this module under a supervisor.
Notifies synchronously of a new message
coming from a channel
.
Notifies synchronously of a new message
coming from a channel_name
to a
publisher
with some metadata
.
Starts a server to distribute messages in a channel
. Additionally can
receive GenServer
options
.
Stops a publisher
.
Link to this section Functions
Link to this function
child_spec(init_arg) View Source
Returns a specification to start this module under a supervisor.
See Supervisor
.
Link to this function
notify(channel, message, metadata \\ nil) View Source
Notifies synchronously of a new message
coming from a channel
.
Link to this function
notify(publisher, channel_name, message, metadata)
View Source
notify(publisher, channel_name, message, metadata)
View Source
notify(
publisher :: GenServer.name(),
channel_name :: term(),
message :: term(),
metadata :: term()
) :: :ok | {:error, term()}
notify( publisher :: GenServer.name(), channel_name :: term(), message :: term(), metadata :: term() ) :: :ok | {:error, term()}
Notifies synchronously of a new message
coming from a channel_name
to a
publisher
with some metadata
.
Link to this function
start_link(channel, options \\ [])
View Source
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()
Starts a server to distribute messages in a channel
. Additionally can
receive GenServer
options
.
Link to this function
stop(publisher)
View Source
stop(publisher)
View Source
stop(GenServer.name()) :: :ok
stop(GenServer.name()) :: :ok
Stops a publisher
.