channels v0.0.1 Channels.Monitor
This module establishes connection with the given config, monitors the connection, and provides new channels.
If the connection crashes all processes that requested a channel receive an exit signal with the reason given by the connection, and the monitor exits.
Summary
Functions
Returns the connection and stores the given pid to be notified in case of connection crash
Starts a new monitor
Types
opts :: [GenServer.option | {:adapter, Channels.Adapter.t}]
Functions
Specs
get_conn(GenServer.server, pid) :: Channels.Adapter.conn
Returns the connection and stores the given pid to be notified in case of connection crash.
Specs
start_link(Channels.Adapter.config, opts) :: GenServer.on_start
Starts a new monitor.
config
- The configuration to be given to the adapter.opts
- GenServer options plus :adapter (got from config by default).