mirror of
https://github.com/redis/go-redis.git
synced 2025-07-31 05:04:23 +03:00
Make FailoverClient(sentinel mode) more robust (#1655)
* add failover option AllowDisconnectedSlaves * checkout unrelated changes * Make NewFailoverClient (sentinel mode) robust. * fix lint issue * Fix bug * Fix lint issue * add comment * checkout unrelated changes * Refine code * checkout unrelated changes
This commit is contained in:
@ -43,3 +43,8 @@ func (s *source) Seed(seed int64) {
|
||||
s.src.Seed(seed)
|
||||
s.mu.Unlock()
|
||||
}
|
||||
|
||||
// Shuffle pseudo-randomizes the order of elements.
|
||||
// n is the number of elements.
|
||||
// swap swaps the elements with indexes i and j.
|
||||
func Shuffle(n int, swap func(i, j int)) { pseudo.Shuffle(n, swap) }
|
||||
|
Reference in New Issue
Block a user