切换go-redis库

This commit is contained in:
2024-06-20 11:18:46 +08:00
parent 4a8a262d0f
commit 0838c037cd
5 changed files with 20 additions and 334 deletions

View File

@ -18,14 +18,11 @@ import (
wrapperOperate "git.zhangdeman.cn/zhangdeman/wrapper"
redisClient "github.com/go-redis/redis/v8"
"github.com/pkg/errors"
redisClientV9 "github.com/redis/go-redis/v9"
"go.uber.org/zap"
)
var (
Client abstract.IRedisClient
ClientV9 abstract.IRedisClient
ClientVersion = define.ClientVersionV8
Client abstract.IRedisClient
)
func init() {
@ -34,11 +31,6 @@ func init() {
instanceTable: make(map[string]*redisClient.ClusterClient),
whiteCommandTable: make(map[string]bool),
}
ClientV9 = &OwnClientV9{
lock: &sync.RWMutex{},
instanceTable: make(map[string]*redisClientV9.ClusterClient),
whiteCommandTable: make(map[string]bool),
}
}
type OwnClient struct {