UrbitEx.Channel (UrbitEx v0.6.6) View Source
GenServer module to open Eyre channels. Defines an UrbitEx.Channel struct to keep track of the channel state. Elixir processes can subscribe to channels to consume the events their propagate, either raw Eyre events or Eyre events parsed by UrbitEx.Reducer
Link to this section Summary
Functions
Returns a specification to start this module under a supervisor.
Subscribes to a channel in order to receive the SSE events (after parsing by the UrbitEx default reducer) it publishes. Takes a pid or atom name of the channel to subscribe to, and the pid of the subscriber process.
Subscribes to a raw Eyre SSE pipeline in order to receive the raw SSE events it publishes. Takes a pid or atom name of the channel to subscribe to, and the pid of the subscriber process.
Fetches Channel state. Takes a pid or atom name of the channel to fetch. Returns a Channel struct, to be used in UrbitEx functions involving PUT requests.
Deletes the subscription to a channel. No events will be received after calling this function. Takes a pid or atom name of the channel to subscribe from, and the pid of the subscriber process.
Deletes the subscription to raw events. Takes a pid or atom name of the channel to unsubscribe from, and the pid of the subscriber process.
Link to this section Functions
Specs
Returns a specification to start this module under a supervisor.
See Supervisor
.
Subscribes to a channel in order to receive the SSE events (after parsing by the UrbitEx default reducer) it publishes. Takes a pid or atom name of the channel to subscribe to, and the pid of the subscriber process.
Subscribes to a raw Eyre SSE pipeline in order to receive the raw SSE events it publishes. Takes a pid or atom name of the channel to subscribe to, and the pid of the subscriber process.
Fetches Channel state. Takes a pid or atom name of the channel to fetch. Returns a Channel struct, to be used in UrbitEx functions involving PUT requests.
Deletes the subscription to a channel. No events will be received after calling this function. Takes a pid or atom name of the channel to subscribe from, and the pid of the subscriber process.
Deletes the subscription to raw events. Takes a pid or atom name of the channel to unsubscribe from, and the pid of the subscriber process.