Skip to content

Commit

Permalink
Allow sentinel tls
Browse files Browse the repository at this point in the history
  • Loading branch information
EmilyMatt committed Jun 5, 2024
1 parent 23b888d commit 0edc166
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
10 changes: 9 additions & 1 deletion src/client/blocking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,15 @@ pub(crate) fn get_sentinel_client(
vec![connection_info.to_owned()],
name.to_string(),
Some(redis::sentinel::SentinelNodeConnectionInfo {
tls_mode: None,
tls_mode: match connection_info.addr {
redis::ConnectionAddr::TcpTls { insecure: true, .. } => {
Some(redis::TlsMode::Insecure)
}
redis::ConnectionAddr::TcpTls {
insecure: false, ..
} => Some(redis::TlsMode::Secure),
_ => None,
},
redis_connection_info: Some(connection_info.redis.clone()),
}),
redis::sentinel::SentinelServerType::Master,
Expand Down
2 changes: 1 addition & 1 deletion src/connection_info/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ impl TryFrom<&str> for FalkorConnectionInfo {
);

match scheme.as_str() {
"redis" | "rediss" => {
"redis" | "rediss" | "redis+unix" => {
#[cfg(feature = "redis")]
return Ok(FalkorConnectionInfo::Redis(
redis::IntoConnectionInfo::into_connection_info(serialized)
Expand Down

0 comments on commit 0edc166

Please sign in to comment.