mirror of
https://github.com/hibiken/asynq.git
synced 2024-12-25 23:32:17 +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.
|
||||
SentinelAddrs []string
|
||||
|
||||
// Redis sentinel username.
|
||||
SentinelUsername string
|
||||
|
||||
// Redis sentinel password.
|
||||
SentinelPassword string
|
||||
|
||||
@ -364,6 +367,7 @@ func (opt RedisFailoverClientOpt) MakeRedisClient() interface{} {
|
||||
return redis.NewFailoverClient(&redis.FailoverOptions{
|
||||
MasterName: opt.MasterName,
|
||||
SentinelAddrs: opt.SentinelAddrs,
|
||||
SentinelUsername: opt.SentinelUsername,
|
||||
SentinelPassword: opt.SentinelPassword,
|
||||
Username: opt.Username,
|
||||
Password: opt.Password,
|
||||
|
Loading…
Reference in New Issue
Block a user