envio v0.6.0 Envio.Channels View Source

Channels storage.

It manages all the channels currently existing in the system.

Link to this section Summary

Functions

Returns a specification to start this module under a supervisor.

Default initialization callback (noop.)

Registers new channel.

Starts a new channels bucket.

Get list of active subscriptions.

Link to this section Functions

Returns a specification to start this module under a supervisor.

See Supervisor.

Default initialization callback (noop.)

Link to this function

register(host, channels)

View Source
register(atom() | {atom(), atom()}, [
  {atom(), %Envio.Channel{name: term(), source: term()}}
]) ::
  :ok
  | {:error,
     {:already_registered, %Envio.Channel{name: term(), source: term()}}}

Registers new channel.

Starts a new channels bucket.

Link to this function

state()

View Source
state() :: %Envio.State{
  messages: term(),
  options: term(),
  subscriptions: term()
}

Get list of active subscriptions.