8000 better documentation for the $tlsOptions parameter of RedisCluster · phpredis/phpredis@8144db3 · GitHub
[go: up one dir, main page]

Skip to content

Commit 8144db3

Browse files
JacobBrownAustinmichael-grunder
authored andcommitted
better documentation for the $tlsOptions parameter of RedisCluster
1 parent 0fe45d2 commit 8144db3

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

cluster.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,10 @@ $obj_cluster = new RedisCluster(NULL, ["host:7000", "host:7001"], 1.5, 1.5, true
2222
// Connect with cluster using password.
2323
$obj_cluster = new RedisCluster(NULL, ["host:7000", "host:7001"], 1.5, 1.5, true, "password");
2424

25-
// Connect wi 6407 th cluster using SSL/TLS
26-
// last argument is an array with [SSL context](https://www.php.net/manual/en/context.ssl.php) options
25+
// Connect with cluster using TLS
26+
// last argument is an optional array with [SSL context options](https://www.php.net/manual/en/context.ssl.php) (TLS options)
27+
// If value is array (even empty), it will connect via TLS. If not, it will connect without TLS.
28+
// Note: If the seeds start with "ssl:// or tls://", it will connect to the seeds via TLS, but the subsequent connections will connect without TLS if this value is null. So, if your nodes require TLS, this value must be an array, even if empty.
2729
$obj_cluster = new RedisCluster(NULL, ["host:7000", "host:7001"], 1.5, 1.5, true, NULL, ["verify_peer" => false]);
2830
```
2931

0 commit comments

Comments
 (0)
0