Pass username to new redis client

This commit is contained in:
Simon Hang authored and ginuerzh committed 2025-10-30 13:26:11 +08:00
1 parent a0c46cec6e
commit d2cc07d3ac
2 files changed
+7

No files matched your search

+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,
}),