Use the redis.UniversalClient interface instead of *redis.Client when interacting with go-redis (#1149)

* Use the redis.UniversalClient interface instead of *redis.Client when interacting with go-redis

* Update protocol to v1.2.1
This commit is contained in:
Benjamin Pracht
2022-11-07 17:27:28 -08:00
committed by GitHub
parent 5a8a6d11b2
commit c735668f67
8 changed files with 27 additions and 28 deletions
+2 -2
View File
@@ -33,7 +33,7 @@ const (
type RedisRouter struct {
LocalRouter
rc *redis.Client
rc redis.UniversalClient
ctx context.Context
isStarted atomic.Bool
nodeMu sync.RWMutex
@@ -44,7 +44,7 @@ type RedisRouter struct {
cancel func()
}
func NewRedisRouter(currentNode LocalNode, rc *redis.Client) *RedisRouter {
func NewRedisRouter(currentNode LocalNode, rc redis.UniversalClient) *RedisRouter {
rr := &RedisRouter{
LocalRouter: *NewLocalRouter(currentNode),
rc: rc,