Boltun.Listener
Listens to Postgrex notifications and invokes the registed callbacks.
Summary↑
add_callback(listener, channel, value) | Adds a callback to the given channel |
remove_channel(listener, channel) | Removes all callbacks for the given channel |
start_link(opts, server_opts) | Starts a listener. Expects a keyword list with the following parameters
|
stop(listener) | Stops this listener and deregisters all channels |
Functions
Adds a callback to the given channel
Removes all callbacks for the given channel
Starts a listener. Expects a keyword list with the following parameters
:connection
=> pid or name of the connection to the database:callbacks_agent
=> pid or name of the agent keeping track of the callbacksand a keyword list with GenServer specific options, like
:name
.
Stops this listener and deregisters all channels