You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
597 B

  1. package push
  2. import (
  3. "context"
  4. )
  5. // NotificationHandler defines the interface for push notification handlers.
  6. type NotificationHandler interface {
  7. // HandlePushNotification processes a push notification with context information.
  8. // The handlerCtx provides information about the client, connection pool, and connection
  9. // on which the notification was received, allowing handlers to make informed decisions.
  10. // Returns an error if the notification could not be handled.
  11. HandlePushNotification(ctx context.Context, handlerCtx NotificationHandlerContext, notification []interface{}) error
  12. }