-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add sub for redis #4725
base: master
Are you sure you want to change the base?
feat: add sub for redis #4725
Conversation
b1aeec4
to
f328d98
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds subscription functionality for Redis by introducing new cluster and client managers for pub/sub as well as corresponding API methods and tests.
- Introduces getPubSubCluster and getPubSubClient functions for handling Redis subscriptions.
- Adds new subscription methods (Subscribe, SubscribeCtx, PSubscribe, PSubscribeCtx) in redis.go.
- Provides tests to validate the new pub/sub behavior.
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
core/stores/redis/redispubsubclustermanager.go | Adds cluster client creation for pub/sub subscriptions |
core/stores/redis/redispubsubclientmanager.go | Adds standard client creation for pub/sub subscriptions |
core/stores/redis/redis_test.go | Implements tests for different pub/sub subscription scenarios |
core/stores/redis/redis.go | Adds new subscription API methods and introduces getPubSubRedis helper |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files
🚀 New features to boost your workflow:
|
var tlsConfig *tls.Config | ||
if r.tls { | ||
tlsConfig = &tls.Config{ | ||
InsecureSkipVerify: true, |
Check failure
Code scanning / CodeQL
Disabled TLS certificate check High
var tlsConfig *tls.Config | ||
if r.tls { | ||
tlsConfig = &tls.Config{ | ||
InsecureSkipVerify: true, |
Check failure
Code scanning / CodeQL
Disabled TLS certificate check High
Currently, there are pub commands, but no sub commands, which feels odd. This PR adds the missing sub functionality.