logging has been changed.
This commit is contained in:
@@ -5,14 +5,12 @@ import (
|
||||
"time"
|
||||
|
||||
"git.loafle.net/commons_go/config"
|
||||
"git.loafle.net/commons_go/logging"
|
||||
rp "git.loafle.net/commons_go/redis_pool"
|
||||
)
|
||||
|
||||
func NewPool(ctx context.Context) rp.Pool {
|
||||
h := &poolHandlers{
|
||||
ctx: ctx,
|
||||
logger: logging.WithContext(ctx),
|
||||
ctx: ctx,
|
||||
}
|
||||
h.cfg = config.Sub("redis")
|
||||
h.MaxIdle = h.cfg.GetInt("pool.MaxIdle")
|
||||
|
||||
@@ -8,14 +8,12 @@ import (
|
||||
|
||||
"git.loafle.net/commons_go/config"
|
||||
rp "git.loafle.net/commons_go/redis_pool"
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
type poolHandlers struct {
|
||||
rp.PoolHandlers
|
||||
ctx context.Context
|
||||
logger *zap.Logger
|
||||
cfg config.Configurator
|
||||
ctx context.Context
|
||||
cfg config.Configurator
|
||||
}
|
||||
|
||||
func (h *poolHandlers) Dial() (redis.Conn, error) {
|
||||
|
||||
Reference in New Issue
Block a user