From df95d799d3861434f4a49f439fce18871b86bb13 Mon Sep 17 00:00:00 2001 From: Maxime Besson <46450505+maxbes@users.noreply.github.com> Date: Tue, 18 Jun 2024 10:33:29 +0200 Subject: [PATCH] Update documentation with sentinels authentication options --- README.pod | 19 +++++++++++++++++++ lib/Redis.pm | 19 +++++++++++++++++++ 2 files changed, 38 insertions(+) diff --git a/README.pod b/README.pod index de7999f..3f9dfca 100644 --- a/README.pod +++ b/README.pod @@ -315,6 +315,20 @@ using the sentinels feature, the Redis client will wait at most that number of seconds (can be fractional) before giving up when reading from a sentinel server. B: 1 +=head3 C<< username >> + +If your Redis server requires authentication, you can optionally use the +C<< username >> attribute. After each established connection (at the start or +when reconnecting), the Redis C<< AUTH >> command will be send to the server. +If the username/password combination is wrong, an exception will be thrown and +reconnect will be disabled. + +=head3 C<< sentinels_username >> + +If your Redis sentinel server requires authentication, you can use the +C<< sentinels_username >> attribute to specify the optional username to +authenticate as. + =head3 C<< password >> If your Redis server requires authentication, you can use the C<< password >> @@ -322,6 +336,11 @@ attribute. After each established connection (at the start or when reconnecting), the Redis C<< AUTH >> command will be send to the server. If the password is wrong, an exception will be thrown and reconnect will be disabled. +=head3 C<< sentinels_password >> + +If your Redis sentinel server requires authentication, you can use the +C<< sentinels_password >> attribute to specify the password. + =head3 C<< on_connect >> You can also provide a code reference that will be immediately after each diff --git a/lib/Redis.pm b/lib/Redis.pm index 62bcb21..6cebbc9 100644 --- a/lib/Redis.pm +++ b/lib/Redis.pm @@ -1373,6 +1373,20 @@ using the sentinels feature, the Redis client will wait at most that number of seconds (can be fractional) before giving up when reading from a sentinel server. B: 1 +=head3 C<< username >> + +If your Redis server requires authentication, you can optionally use the +C<< username >> attribute. After each established connection (at the start or +when reconnecting), the Redis C<< AUTH >> command will be send to the server. +If the username/password combination is wrong, an exception will be thrown and +reconnect will be disabled. + +=head3 C<< sentinels_username >> + +If your Redis sentinel server requires authentication, you can use the +C<< sentinels_username >> attribute to specify the optional username to +authenticate as. + =head3 C<< password >> If your Redis server requires authentication, you can use the C<< password >> @@ -1380,6 +1394,11 @@ attribute. After each established connection (at the start or when reconnecting), the Redis C<< AUTH >> command will be send to the server. If the password is wrong, an exception will be thrown and reconnect will be disabled. +=head3 C<< sentinels_password >> + +If your Redis sentinel server requires authentication, you can use the +C<< sentinels_password >> attribute to specify the password. + =head3 C<< on_connect >> You can also provide a code reference that will be immediately after each