|
|
|
@ -2,6 +2,7 @@ package redis
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"fmt"
|
|
|
|
|
"strings"
|
|
|
|
|
|
|
|
|
|
red "github.com/go-redis/redis/v8"
|
|
|
|
|
"github.com/zeromicro/go-zero/core/logx"
|
|
|
|
@ -31,7 +32,7 @@ func CreateBlockingNode(r *Redis) (ClosableNode, error) {
|
|
|
|
|
return &clientBridge{client}, nil
|
|
|
|
|
case ClusterType:
|
|
|
|
|
client := red.NewClusterClient(&red.ClusterOptions{
|
|
|
|
|
Addrs: []string{r.Addr},
|
|
|
|
|
Addrs: strings.Split(r.Addr, ","),
|
|
|
|
|
Password: r.Pass,
|
|
|
|
|
MaxRetries: maxRetries,
|
|
|
|
|
PoolSize: 1,
|
|
|
|
|