deprecated_overflow_gateway.../redis/pool.go
2017-09-19 17:38:59 +09:00

22 lines
374 B
Go

package redis
import (
"context"
"time"
rp "git.loafle.net/commons_go/redis_pool"
"git.loafle.net/overflow/overflow_gateway_probe/conf"
)
func NewPool(ctx context.Context) rp.Pool {
h := &poolHandlers{
ctx: ctx,
}
h.MaxIdle = conf.Config.Redis.Pool.MaxIdle
h.IdleTimeout = conf.Config.Redis.Pool.IdleTimeout * time.Second
p := rp.NewPool(ctx, h)
return p
}