deprecated_overflow_gateway.../redis/pool.go
2017-09-19 17:28:21 +09:00

24 lines
374 B
Go

package redis
import (
"context"
"time"
"git.loafle.net/overflow/overflow_gateway_web/conf"
rp "git.loafle.net/commons_go/redis_pool"
)
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
}