yggdrasil v2.0.0 Yggdrasil.Publisher

A publisher server. Decodes the message comming from a connection and sends it to a channel.

Summary

Functions

Notifies asynchronously the publisher of a message in a channel

Starts a publisher with a channel (Yggdrasil.Channel. This channel contains the decoder module, the channel where it’ll write the decoded messages. Also it is possible to provide a list of GenServer options

Stops a publisher with a reason. By default reason is :normal

Notifies synchronously the publisher of a message in a channel

Functions

async_notify(publisher, channel, message)

Notifies asynchronously the publisher of a message in a channel.

start_link(channel, options \\ [])

Starts a publisher with a channel (Yggdrasil.Channel. This channel contains the decoder module, the channel where it’ll write the decoded messages. Also it is possible to provide a list of GenServer options.

stop(publisher, reason \\ :normal)

Stops a publisher with a reason. By default reason is :normal.

sync_notify(publisher, channel, message)

Notifies synchronously the publisher of a message in a channel.