Pass username to new redis client

This commit is contained in:
Simon Hang
2025-10-19 02:54:49 +11:00
committed by ginuerzh
parent a0c46cec6e
commit d2cc07d3ac
2 changed files with 7 additions and 0 deletions
+3
View File
@@ -64,6 +64,7 @@ func RedisSetRecorder(addr string, opts ...RedisRecorderOption) recorder.Recorde
recorder: options.recorder,
client: redis.NewClient(&redis.Options{
Addr: addr,
Username: options.username,
Password: options.password,
DB: options.db,
}),
@@ -102,6 +103,7 @@ func RedisListRecorder(addr string, opts ...RedisRecorderOption) recorder.Record
recorder: options.recorder,
client: redis.NewClient(&redis.Options{
Addr: addr,
Username: options.username,
Password: options.password,
DB: options.db,
}),
@@ -140,6 +142,7 @@ func RedisSortedSetRecorder(addr string, opts ...RedisRecorderOption) recorder.R
recorder: options.recorder,
client: redis.NewClient(&redis.Options{
Addr: addr,
Username: options.username,
Password: options.password,
DB: options.db,
}),