mirror of
https://github.com/redis/go-redis.git
synced 2025-07-29 17:41:15 +03:00
Add WrapProcessPipeline
This commit is contained in:
committed by
Vladimir Mihailenco
parent
2c11cbf01a
commit
8b4fa6d443
14
sentinel.go
14
sentinel.go
@ -76,7 +76,7 @@ func NewFailoverClient(failoverOpt *FailoverOptions) *Client {
|
||||
opt: opt,
|
||||
}
|
||||
|
||||
client := Client{
|
||||
c := Client{
|
||||
baseClient: baseClient{
|
||||
opt: opt,
|
||||
connPool: failover.Pool(),
|
||||
@ -86,9 +86,10 @@ func NewFailoverClient(failoverOpt *FailoverOptions) *Client {
|
||||
},
|
||||
},
|
||||
}
|
||||
client.setProcessor(client.Process)
|
||||
c.baseClient.init()
|
||||
c.setProcessor(c.Process)
|
||||
|
||||
return &client
|
||||
return &c
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
@ -100,14 +101,15 @@ type sentinelClient struct {
|
||||
|
||||
func newSentinel(opt *Options) *sentinelClient {
|
||||
opt.init()
|
||||
client := sentinelClient{
|
||||
c := sentinelClient{
|
||||
baseClient: baseClient{
|
||||
opt: opt,
|
||||
connPool: newConnPool(opt),
|
||||
},
|
||||
}
|
||||
client.cmdable = cmdable{client.Process}
|
||||
return &client
|
||||
c.baseClient.init()
|
||||
c.cmdable.setProcessor(c.Process)
|
||||
return &c
|
||||
}
|
||||
|
||||
func (c *sentinelClient) PubSub() *PubSub {
|
||||
|
Reference in New Issue
Block a user