Skip to content

Commit fbfa8a8

Browse files
committed
feat: make connection parameters optional
1 parent 513157b commit fbfa8a8

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# libcluster Postgres Strategy
1+
# Libcluster Postgres Strategy
22

33
[![Hex version badge](https://img.shields.io/hexpm/v/libcluster_postgres.svg)](https://hex.pm/packages/libcluster_postgres)
44
[![License badge](https://img.shields.io/hexpm/l/libcluster_postgres.svg)](https://github.com/supabase/libcluster_postgres/blob/main/LICENSE)
@@ -38,6 +38,7 @@ config :libcluster,
3838
password: "postgres",
3939
database: "postgres",
4040
port: 5432,
41+
# optional, connection parameters. Defaults to []
4142
parameters: [],
4243
# optional, defaults to false
4344
ssl: true,

lib/strategy.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ defmodule LibclusterPostgres.Strategy do
3434
port: Keyword.fetch!(state.config, :port),
3535
ssl: Keyword.get(state.config, :ssl),
3636
ssl_opts: Keyword.get(state.config, :ssl_opts),
37-
parameters: Keyword.fetch!(state.config, :parameters),
37+
parameters: Keyword.get(state.config, :parameters, []),
3838
channel_name: channel_name
3939
]
4040

0 commit comments

Comments
 (0)