-
Notifications
You must be signed in to change notification settings - Fork 11
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
Added functions to ctx for RedisModule_GetClient* #180
base: main
Are you sure you want to change the base?
Conversation
dmitrypol
commented
Feb 24, 2025
•
edited
Loading
edited
- added functions to Context to get_client_id, name, username, info and certificate in separate client.rs
- added example and tests
src/context/mod.rs
Outdated
ValkeyString::from_redis_module_string(self.ctx, client_cert) | ||
} | ||
|
||
pub fn get_client_info(&self) -> ValkeyValue { |
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.
@KarthikSubbarao - I decided to just return u64 here, we can revisit it later redis/redis#13828 (comment)
src/context/mod.rs
Outdated
@@ -829,6 +830,36 @@ impl Context { | |||
.map_err(|_e| ValkeyError::Str("User does not have permissions on key")) | |||
} | |||
|
|||
pub fn get_client_id(&self) -> u64 { |
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.
@KarthikSubbarao - also since mod.rs is a very large file I moved these to a new filesrc/context/client.rs
and did impl Context
for these 5 functions.
* updated version to 0.1.3 Signed-off-by: Dmitry Polyakovsky <[email protected]> * Add support for generating bindings on ValkeyModule APIs (valkey-io#172) * Add support for generating bindings on ValkeyModule APIs Signed-off-by: Karthik Subbarao <[email protected]> * Update header files to match latest OSS core engine header files Signed-off-by: Karthik Subbarao <[email protected]> --------- Signed-off-by: Karthik Subbarao <[email protected]> Signed-off-by: Dmitry Polyakovsky <[email protected]> * minor cleanup tests and data_type2.rs updated dependencies Signed-off-by: Dmitry Polyakovsky <[email protected]> --------- Signed-off-by: Dmitry Polyakovsky <[email protected]> Signed-off-by: Karthik Subbarao <[email protected]> Co-authored-by: Dmitry Polyakovsky <[email protected]> Co-authored-by: KarthikSubbarao <[email protected]> Signed-off-by: Dmitry Polyakovsky <[email protected]>
minor tweaks Signed-off-by: Dmitry Polyakovsky <[email protected]>
Signed-off-by: Dmitry Polyakovsky <[email protected]>
added example and tests Signed-off-by: Dmitry Polyakovsky <[email protected]>
Signed-off-by: Dmitry Polyakovsky <[email protected]>
…io#178) Signed-off-by: VanessaTang <[email protected]> Signed-off-by: Dmitry Polyakovsky <[email protected]>