deprecated_overflow_gateway.../redis/pool_handlers.go

27 lines
502 B
Go
Raw Normal View History

2017-09-11 02:24:18 +00:00
package redis
import (
"context"
"time"
"github.com/garyburd/redigo/redis"
rp "git.loafle.net/commons_go/redis_pool"
2017-09-19 08:38:59 +00:00
"git.loafle.net/overflow/overflow_gateway_probe/conf"
2017-09-11 02:24:18 +00:00
"go.uber.org/zap"
)
type poolHandlers struct {
rp.PoolHandlers
ctx context.Context
logger *zap.Logger
}
func (h *poolHandlers) Dial() (redis.Conn, error) {
2017-09-19 08:38:59 +00:00
return redis.Dial(conf.Config.Redis.Network, conf.Config.Redis.Addr)
2017-09-11 02:24:18 +00:00
}
func (h *poolHandlers) TestOnBorrow(c redis.Conn, t time.Time) error {
return nil
}