Skip to content

Commit 168e3a1

Browse files
committed
docs: add channel_name cookie docs
1 parent c38cab8 commit 168e3a1

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,13 @@ config :libcluster,
3737
database: "postgres",
3838
port: 5432,
3939
parameters: [],
40+
# optional, defaults to node cookie
4041
channel_name: "cluster"
4142
],
4243
]
4344
]
4445
```
46+
4547
Then add it to your supervision tree:
4648

4749
```elixir
@@ -60,6 +62,6 @@ defmodule MyApp do
6062
end
6163
```
6264

63-
6465
## Acknowledgements
65-
A special thank you to [@gotbones](https://twitter.com/gotbones) for creating libcluster and [@kevinbuch_](https://twitter.com/kevinbuch_) for the original inspiration for this strategy.
66+
67+
A special thank you to [@gotbones](https://twitter.com/gotbones) for creating libcluster and [@kevinbuch\_](https://twitter.com/kevinbuch_) for the original inspiration for this strategy.

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)