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

chore: cleanup names

This commit is contained in:
Vladimir Mihailenco
2023-01-21 10:30:02 +02:00
parent a5aeb1659b
commit 767109c632
6 changed files with 83 additions and 94 deletions

View File

@@ -214,7 +214,7 @@ func NewFailoverClient(failoverOpt *FailoverOptions) *Client {
}
rdb.init()
connPool = newConnPool(opt, rdb.hooks.dial)
connPool = newConnPool(opt, rdb.dialHook)
rdb.connPool = connPool
rdb.onClose = failover.Close
@@ -267,7 +267,7 @@ func masterReplicaDialer(
// SentinelClient is a client for a Redis Sentinel.
type SentinelClient struct {
*baseClient
hooks
hooksMixin
}
func NewSentinelClient(opt *Options) *SentinelClient {
@@ -278,17 +278,17 @@ func NewSentinelClient(opt *Options) *SentinelClient {
},
}
c.hooks.setDefaultHook(defaultHook{
c.initHooks(hooks{
dial: c.baseClient.dial,
process: c.baseClient.process,
})
c.connPool = newConnPool(opt, c.hooks.dial)
c.connPool = newConnPool(opt, c.dialHook)
return c
}
func (c *SentinelClient) Process(ctx context.Context, cmd Cmder) error {
err := c.hooks.process(ctx, cmd)
err := c.processHook(ctx, cmd)
cmd.SetErr(err)
return err
}