mirror of
https://github.com/redis/go-redis.git
synced 2025-07-29 17:41:15 +03:00
feat: add general push notification system
- Add PushNotificationRegistry for managing notification handlers - Add PushNotificationProcessor for processing RESP3 push notifications - Add client methods for registering push notification handlers - Add PubSub integration for handling generic push notifications - Add comprehensive test suite with 100% coverage - Add push notification demo example This system allows handling any arbitrary RESP3 push notification with registered handlers, not just specific notification types.
This commit is contained in:
11
options.go
11
options.go
@ -216,6 +216,17 @@ type Options struct {
|
||||
// UnstableResp3 enables Unstable mode for Redis Search module with RESP3.
|
||||
// When unstable mode is enabled, the client will use RESP3 protocol and only be able to use RawResult
|
||||
UnstableResp3 bool
|
||||
|
||||
// PushNotifications enables general push notification processing.
|
||||
// When enabled, the client will process RESP3 push notifications and
|
||||
// route them to registered handlers.
|
||||
//
|
||||
// default: false
|
||||
PushNotifications bool
|
||||
|
||||
// PushNotificationProcessor is the processor for handling push notifications.
|
||||
// If nil, a default processor will be created when PushNotifications is enabled.
|
||||
PushNotificationProcessor *PushNotificationProcessor
|
||||
}
|
||||
|
||||
func (opt *Options) init() {
|
||||
|
Reference in New Issue
Block a user