1
0
mirror of https://github.com/redis/go-redis.git synced 2025-10-20 09:52:25 +03:00

feat: RESP3 notifications support & Hitless notifications handling [CAE-1088] & [CAE-1072] (#3418)

- Adds support for handling push notifications with RESP3. 
- Using this support adds handlers for hitless upgrades.

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Hristo Temelski <hristo.temelski@redis.com>
This commit is contained in:
Nedyalko Dyakov
2025-09-10 22:18:01 +03:00
committed by GitHub
parent 2da6ca07c0
commit 0ef6d0727d
70 changed files with 11668 additions and 596 deletions

14
push/handler.go Normal file
View File

@@ -0,0 +1,14 @@
package push
import (
"context"
)
// NotificationHandler defines the interface for push notification handlers.
type NotificationHandler interface {
// HandlePushNotification processes a push notification with context information.
// The handlerCtx provides information about the client, connection pool, and connection
// on which the notification was received, allowing handlers to make informed decisions.
// Returns an error if the notification could not be handled.
HandlePushNotification(ctx context.Context, handlerCtx NotificationHandlerContext, notification []interface{}) error
}