27 lines
502 B
Go
27 lines
502 B
Go
package redis
|
|
|
|
import (
|
|
"context"
|
|
"time"
|
|
|
|
"github.com/garyburd/redigo/redis"
|
|
|
|
rp "git.loafle.net/commons_go/redis_pool"
|
|
"git.loafle.net/overflow/overflow_gateway_probe/conf"
|
|
"go.uber.org/zap"
|
|
)
|
|
|
|
type poolHandlers struct {
|
|
rp.PoolHandlers
|
|
ctx context.Context
|
|
logger *zap.Logger
|
|
}
|
|
|
|
func (h *poolHandlers) Dial() (redis.Conn, error) {
|
|
return redis.Dial(conf.Config.Redis.Network, conf.Config.Redis.Addr)
|
|
}
|
|
|
|
func (h *poolHandlers) TestOnBorrow(c redis.Conn, t time.Time) error {
|
|
return nil
|
|
}
|