Skip to content

Commit

Permalink
Merge pull request #44 from lu-bann/feat/pg-ssl-upstream
Browse files Browse the repository at this point in the history
Add postgres ssl_mode config
  • Loading branch information
0w3n-d authored Oct 15, 2024
2 parents 0c03943 + 374acde commit 2ede4ea
Show file tree
Hide file tree
Showing 5 changed files with 221 additions and 11 deletions.
200 changes: 191 additions & 9 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ serde_yaml = "0.9.33"
deadpool-redis = { version = "0.12.0", features = ["rt_tokio_1"] }
redis = { version = "0.23.2", features = ["aio", "tokio-comp"] }
tokio-postgres = "0.7.12"
tokio-postgres-rustls = "0.12.0"
deadpool-postgres = "0.14.0"
refinery = { version = "0.8.14", features = ["tokio-postgres"]}
bytes = "1.7.2"
Expand Down Expand Up @@ -85,6 +86,8 @@ rand = "0.8.5"
moka = "0.12.8"
num_cpus = "1.16.0"
clap = {version = "4.5.18", features = ["derive"]}
rustls = "0.23.14"
rustls-native-certs = "0.8.0"

# Broadcasting
fiber = { git = "https://github.com/chainbound/fiber-rs.git", tag = "v0.7.4" }
1 change: 1 addition & 0 deletions crates/common/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ pub struct PostgresConfig {
pub password: String,
pub region: i16,
pub region_name: String,
pub ssl_mode: Option<String>,
}

fn default_port() -> u16 {
Expand Down
3 changes: 3 additions & 0 deletions crates/database/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,6 @@ rand.workspace = true
dashmap.workspace = true
thiserror.workspace = true
tracing.workspace = true
tokio-postgres-rustls.workspace = true
rustls.workspace = true
rustls-native-certs.workspace = true
Loading

0 comments on commit 2ede4ea

Please sign in to comment.