Skip to content

Commit d183694

Browse files
Merge pull request phpredis#2011 from feverxai/patch-1
Update sentinel.markdown
2 parents bd68039 + 6141679 commit d183694

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

sentinel.markdown

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ Redis Sentinel also provides other collateral tasks such as monitoring, notifica
1616
*persistent*: String, persistent connection id (optional, default is NULL meaning not persistent)
1717
*retry_interval*: Int, value in milliseconds (optional, default is 0)
1818
*read_timeout*: Float, value in seconds (optional, default is 0 meaning unlimited)
19+
*auth*:String, or an Array with one or two elements, used to authenticate with the redis-sentinel. (optional, default is NULL meaning NOAUTH)
1920

2021
##### *Example*
2122

@@ -25,6 +26,7 @@ $sentinel = new RedisSentinel('127.0.0.1', 26379, 2.5); // 2.5 sec timeout.
2526
$sentinel = new RedisSentinel('127.0.0.1', 26379, 0, 'sentinel'); // persistent connection with id 'sentinel'
2627
$sentinel = new RedisSentinel('127.0.0.1', 26379, 0, ''); // also persistent connection with id ''
2728
$sentinel = new RedisSentinel('127.0.0.1', 26379, 1, null, 100); // 1 sec timeout, 100ms delay between reconnection attempts.
29+
$sentinel = new RedisSentinel('127.0.0.1', 26379, 0, NULL, 0, 0, "secret"); // connect sentinel with password authentication
2830
~~~
2931

3032
### Usage

0 commit comments

Comments
 (0)