1
0
mirror of https://github.com/redis/go-redis.git synced 2025-07-28 06:42:00 +03:00

Use random node to load cluster slots

This commit is contained in:
Vladimir Mihailenco
2020-06-29 17:26:11 +03:00
parent 5b4d00c217
commit 0ffefcde98
7 changed files with 64 additions and 23 deletions

View File

@ -1,8 +1,9 @@
package hashtag
import (
"math/rand"
"strings"
"golang.org/x/exp/rand"
)
const slotNumber = 16384

View File

@ -1,11 +1,11 @@
package hashtag
import (
"math/rand"
"testing"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
"golang.org/x/exp/rand"
)
func TestGinkgoSuite(t *testing.T) {

View File

@ -1,8 +1,9 @@
package internal
import (
"math/rand"
"time"
"golang.org/x/exp/rand"
)
// Retry backoff with jitter sleep to prevent overloaded conditions during intervals