forked from redis/ioredis
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support for “preferredSlave” when connecting to a Sentinel group for
local reads in a distributed environment. Value can be an array of objects with required properties “ip” and “port” and option property of “prio” indicating the priority, defaults to 1, lower numbers preferred first. If the value is a function the available slaves are passed into it, expecting a single slave as the response. If no preferred slave is found a random one is returned from those available. Updated tests to return bad values in SENTINEL slaves command but still select the correct one based on the preferredSlave result.
- Loading branch information
1 parent
b216e4e
commit 8dfbe32
Showing
2 changed files
with
127 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters