mirror of
https://github.com/hanzokv/go.git
synced 2026-09-24 00:31:51 +00:00
- Adds support for handling push notifications with RESP3. - Using this support adds handlers for hitless upgrades. --------- Co-authored-by: Copilot <[email protected]> Co-authored-by: Hristo Temelski <[email protected]>
15 lines
597 B
Go
15 lines
597 B
Go
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
|
|
}
|