Skip to content

Commit 811f8bd

Browse files
committed
support ssl and ssl_opts connection options
1 parent 1087775 commit 811f8bd

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ config :libcluster,
3737
database: "postgres",
3838
port: 5432,
3939
parameters: [],
40+
# optional, defaults to false
41+
ssl: true,
42+
# optional, please refer to the Postgrex docs
43+
ssl_opts: nil,
4044
# optional, defaults to node cookie
4145
channel_name: "cluster"
4246
],

lib/strategy.ex

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ defmodule LibclusterPostgres.Strategy do
3232
password: Keyword.fetch!(state.config, :password),
3333
database: Keyword.fetch!(state.config, :database),
3434
port: Keyword.fetch!(state.config, :port),
35+
ssl: Keyword.get(state.config, :ssl),
36+
ssl_opts: Keyword.get(state.config, :ssl_opts),
3537
parameters: Keyword.fetch!(state.config, :parameters),
3638
channel_name: channel_name
3739
]

mix.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ defmodule LibclusterPostgres.MixProject do
55
[
66
name: "libcluster_postgres",
77
app: :libcluster_postgres,
8-
version: "0.1.1",
8+
version: "0.1.2",
99
elixir: "~> 1.14",
1010
start_permanent: Mix.env() == :prod,
1111
deps: deps(),

0 commit comments

Comments
 (0)