Skip to content

Commit b0ec64f

Browse files
committed
docs: add channel_name cookie docs
1 parent 8cd4716 commit b0ec64f

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ Postgres Strategy for [libcluster](https://hexdocs.pm/libcluster/) which is used
44

55
It uses Postgres `LISTEN` and `NOTIFICATION` to send the information from a given node and connects them using libcluster.
66

7-
87
```elixir
98
config :libcluster,
109
topologies: [
@@ -17,6 +16,7 @@ config :libcluster,
1716
database: "postgres",
1817
port: 5432,
1918
parameters: [],
19+
# optional, defaults to node cookie
2020
channel_name: "cluster"
2121
],
2222
]
@@ -25,7 +25,6 @@ config :libcluster,
2525

2626
To see it in use run the script `./test.sh` in this folder and you will see that both nodes connected as expected and are able to list one another.
2727

28-
2928
## Installation
3029

3130
The package can be installed

lib/strategy.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ defmodule LibclusterPostgres.Strategy do
1111
## Options
1212
1313
* `heartbeat_interval` - The interval at which to send heartbeat messages in milliseconds (optional; default: 5_000)
14-
* `channel_name` - The name of the channel to which nodes will listen and notify (optional; default: "cluster")
14+
* `channel_name` - The name of the channel to which nodes will listen and notify (optional; defaults to the result of `Node.get_cookie/0`)
1515
"""
1616
use GenServer
1717

0 commit comments

Comments
 (0)