mirror of
https://github.com/redis/go-redis.git
synced 2025-07-31 05:04:23 +03:00
refactor: remove unnecessary enabled field and IsEnabled/SetEnabled methods
- Remove enabled field from PushNotificationProcessor struct - Remove IsEnabled() and SetEnabled() methods from processor interface - Remove enabled parameter from NewPushNotificationProcessor() - Update all interfaces in pool package to remove IsEnabled requirement - Simplify processor logic - if processor exists, it works - VoidPushNotificationProcessor handles disabled case by discarding notifications - Update all tests to use simplified interface without enable/disable logic Benefits: - Simpler, cleaner interface with less complexity - No unnecessary state management for enabled/disabled - VoidPushNotificationProcessor pattern handles disabled case elegantly - Reduced cognitive overhead - processors just work when set - Eliminates redundant enabled checks throughout codebase - More predictable behavior - set processor = it works
This commit is contained in:
@ -28,7 +28,6 @@ type Conn struct {
|
||||
|
||||
// Push notification processor for handling push notifications on this connection
|
||||
PushNotificationProcessor interface {
|
||||
IsEnabled() bool
|
||||
ProcessPendingNotifications(ctx context.Context, rd *proto.Reader) error
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user