mirror of
https://github.com/hibiken/asynq.git
synced 2024-11-14 11:31:18 +08:00
Need to support redis sentinel username. (#924)
This commit is contained in:
parent
c8c8adfaa6
commit
1e102a5392
4
asynq.go
4
asynq.go
@ -316,6 +316,9 @@ type RedisFailoverClientOpt struct {
|
|||||||
// https://redis.io/topics/sentinel.
|
// https://redis.io/topics/sentinel.
|
||||||
SentinelAddrs []string
|
SentinelAddrs []string
|
||||||
|
|
||||||
|
// Redis sentinel username.
|
||||||
|
SentinelUsername string
|
||||||
|
|
||||||
// Redis sentinel password.
|
// Redis sentinel password.
|
||||||
SentinelPassword string
|
SentinelPassword string
|
||||||
|
|
||||||
@ -364,6 +367,7 @@ func (opt RedisFailoverClientOpt) MakeRedisClient() interface{} {
|
|||||||
return redis.NewFailoverClient(&redis.FailoverOptions{
|
return redis.NewFailoverClient(&redis.FailoverOptions{
|
||||||
MasterName: opt.MasterName,
|
MasterName: opt.MasterName,
|
||||||
SentinelAddrs: opt.SentinelAddrs,
|
SentinelAddrs: opt.SentinelAddrs,
|
||||||
|
SentinelUsername: opt.SentinelUsername,
|
||||||
SentinelPassword: opt.SentinelPassword,
|
SentinelPassword: opt.SentinelPassword,
|
||||||
Username: opt.Username,
|
Username: opt.Username,
|
||||||
Password: opt.Password,
|
Password: opt.Password,
|
||||||
|
Loading…
Reference in New Issue
Block a user