EventStore v0.15.1 EventStore.Notifications.PostgrexNotifications View Source
This is a copy of the new Postgrex.Notifications module that contains the timeout mechanism.
We copied here so we don’t need to wait for the next stable postgrex release to have this feature without using the postgrex master branch.
Link to this section Summary
Functions
Listens to an asynchronous notification channel channel
. See listen/2
Listens to an asynchronous notification channel using the LISTEN
command.
A message {:notification, connection_pid, ref, channel, payload}
will be
sent to the calling process when a notification is received
Start the notification connection process and connect to postgres
Stops listening on the given channel by passing the reference returned from
listen/2
Stops listening on the given channel by passing the reference returned from
listen/2
Link to this section Types
Link to this section Functions
Listens to an asynchronous notification channel channel
. See listen/2
.
Listens to an asynchronous notification channel using the LISTEN
command.
A message {:notification, connection_pid, ref, channel, payload}
will be
sent to the calling process when a notification is received.
Options
:timeout
- Call timeout (default:5000
)
start_link(Keyword.t()) :: {:ok, pid()} | {:error, Postgrex.Error.t() | term()}
Start the notification connection process and connect to postgres.
The option that this function accepts are exactly the same accepted by
Postgrex.start_link/1
. Note :sync_connect
defaults to true
.
Stops listening on the given channel by passing the reference returned from
listen/2
.
Stops listening on the given channel by passing the reference returned from
listen/2
.
Options
:timeout
- Call timeout (default:5000
)