1
0
mirror of https://github.com/redis/go-redis.git synced 2025-07-28 06:42:00 +03:00

Add WithTimeout

This commit is contained in:
Vladimir Mihailenco
2020-02-02 14:59:27 +02:00
parent 2df96f7ef0
commit d2e52839ee
4 changed files with 62 additions and 18 deletions

View File

@ -94,14 +94,11 @@ func NewFailoverClient(failoverOpt *FailoverOptions) *Client {
}
c := Client{
baseClient: baseClient{
opt: opt,
connPool: failover.Pool(),
onClose: failover.Close,
},
ctx: context.Background(),
baseClient: newBaseClient(opt, failover.Pool()),
ctx: context.Background(),
}
c.cmdable = c.Process
c.onClose = failover.Close
return &c
}