feat: 优化redis日志实例的注入方式
This commit is contained in:
@@ -7,7 +7,10 @@
|
||||
// Date : 2024-06-18 16:12
|
||||
package define
|
||||
|
||||
import redisClient "github.com/redis/go-redis/v9"
|
||||
import (
|
||||
redisClient "github.com/redis/go-redis/v9"
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
type Options struct {
|
||||
DB int `json:"db" yaml:"db" ini:"db" toml:"db"` // 选择的数据库序号
|
||||
@@ -61,6 +64,7 @@ type Config struct {
|
||||
//
|
||||
// Date : 16:06 2024/10/8
|
||||
type ClientInfo struct {
|
||||
Logger *zap.Logger // 日志实例
|
||||
ReadOnly bool // 是否只读
|
||||
Master *redisClient.Client // 主库连接
|
||||
Slave *redisClient.Client // 从库连接
|
||||
|
||||
Reference in New Issue
Block a user