1
0
mirror of https://github.com/redis/go-redis.git synced 2025-07-29 17:41:15 +03:00

feat: enhance push notification handlers with context information

This commit is contained in:
Nedyalko Dyakov
2025-07-04 17:08:08 +03:00
parent c44c8b5b03
commit 47dd490a8a
11 changed files with 242 additions and 128 deletions

View File

@ -62,9 +62,7 @@ type FailoverOptions struct {
Username string
Password string
// PushNotifications enables push notifications for RESP3.
// Defaults to true for RESP3 connections.
PushNotifications bool
// Push notifications are always enabled for RESP3 connections
// CredentialsProvider allows the username and password to be updated
// before reconnecting. It should return the current username and password.
CredentialsProvider func() (username string, password string)
@ -133,7 +131,6 @@ func (opt *FailoverOptions) clientOptions() *Options {
Protocol: opt.Protocol,
Username: opt.Username,
Password: opt.Password,
PushNotifications: opt.PushNotifications,
CredentialsProvider: opt.CredentialsProvider,
CredentialsProviderContext: opt.CredentialsProviderContext,
StreamingCredentialsProvider: opt.StreamingCredentialsProvider,