1
0
mirror of https://github.com/redis/go-redis.git synced 2025-07-28 06:42:00 +03:00

refactor(push): completly change the package structure

This commit is contained in:
Nedyalko Dyakov
2025-07-05 02:52:40 +03:00
parent b4d0ff15fb
commit 84123b1331
13 changed files with 1987 additions and 394 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
}