-
Notifications
You must be signed in to change notification settings - Fork 65
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
Post notification API and API versioning #304
Post notification API and API versioning #304
Conversation
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.
Great job! 👍
3fc3903
to
af46fd4
Compare
So with this change, we should split the macros into two parts: internal and external. External is for the event handlers and other stuff for a user module, and internal is the stuff which only the |
Yes I agree it makes sense to split it. |
…erly compiled and analysed by IDE.
@vityafx I think I addressed all the comments other then the naming which I commented on. Let me know what you think. |
The PR is a proposal for API versioning using feature flags.
The PR introduce 4 new feature flags:
min-redis-compatibility-version-7-2
min-redis-compatibility-version-7-0
min-redis-compatibility-version-6-2
min-redis-compatibility-version-6-0
- defaultUser should set one of those feature flag which will indicate the minimum Redis version he want to be compatible with. Base on this, redismodule-rs will decide which API can be used and will manipulate existing API so it can be used conditionally.
For example, take the following API:
This API require Redis version 7.2, so if
min-redis-compatibility-version-7-2
feature is set the API is exposed as is. But if some othermin-redis-compatibility-version-*
is set, the API is changed to returnAPIResult
which will allow to conditionally use this API if exists on the current Redis instance.The PR also adds support for post notifications jobs and demonstrate how to use the new
min-redis-compatibility-version-*
flags.Depends on: #302