Skip to content

Commit 4b53230

Browse files
committed
chore: update README for listen/notify support
1 parent 66edd75 commit 4b53230

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,17 @@ it must be included as a `rebar3` dependency and runtime dependency (listed in
162162
your application's `.app.src` `applications` or the list of applications for
163163
`relx` to include in a release).
164164

165+
### Listen/Notify
166+
167+
Use `pgo_notifications:start_link` to create a process holding a connection to
168+
the database that you can call `pgo_notifications:listen/2` with to listen on a
169+
channel for notifications. Those notifications will arrive at the calling
170+
process in the form:
171+
172+
```
173+
{notification, Pid, Ref, Channel, Payload}
174+
```
175+
165176
## Running Tests
166177

167178
Pool functionality is tested with common test suites:

0 commit comments

Comments
 (0)