diff options
author | Yossi Gottlieb <yossigo@gmail.com> | 2020-10-05 17:06:35 +0300 |
---|---|---|
committer | Yossi Gottlieb <yossigo@gmail.com> | 2020-10-11 16:04:14 +0300 |
commit | 7d117d7591656e947f526f5d5f8a022b88b38ad9 (patch) | |
tree | bb3ccff2d6c07ee1f85121424effa9b17c956eff /src/redismodule.h | |
parent | 9b7f8ba84b9de1ec846badd45e4004e3cd23f178 (diff) | |
download | redis-7d117d7591656e947f526f5d5f8a022b88b38ad9.tar.gz |
Modules: add RM_GetCommandKeys().
This is essentially the same as calling COMMAND GETKEYS but provides a
more efficient interface that can be used in every context (i.e. not a
Redis command).
Diffstat (limited to 'src/redismodule.h')
-rw-r--r-- | src/redismodule.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/redismodule.h b/src/redismodule.h index 00ca1f578..e05ce65ee 100644 --- a/src/redismodule.h +++ b/src/redismodule.h @@ -726,6 +726,7 @@ REDISMODULE_API int (*RedisModule_SetModuleUserACL)(RedisModuleUser *user, const REDISMODULE_API int (*RedisModule_AuthenticateClientWithACLUser)(RedisModuleCtx *ctx, const char *name, size_t len, RedisModuleUserChangedFunc callback, void *privdata, uint64_t *client_id) REDISMODULE_ATTR; REDISMODULE_API int (*RedisModule_AuthenticateClientWithUser)(RedisModuleCtx *ctx, RedisModuleUser *user, RedisModuleUserChangedFunc callback, void *privdata, uint64_t *client_id) REDISMODULE_ATTR; REDISMODULE_API int (*RedisModule_DeauthenticateAndCloseClient)(RedisModuleCtx *ctx, uint64_t client_id) REDISMODULE_ATTR; +REDISMODULE_API int *(*RedisModule_GetCommandKeys)(RedisModuleCtx *ctx, const char *cmdname, RedisModuleString **argv, int argc, int *num_keys) REDISMODULE_ATTR; #endif #define RedisModule_IsAOFClient(id) ((id) == CLIENT_ID_AOF) @@ -967,6 +968,7 @@ static int RedisModule_Init(RedisModuleCtx *ctx, const char *name, int ver, int REDISMODULE_GET_API(DeauthenticateAndCloseClient); REDISMODULE_GET_API(AuthenticateClientWithACLUser); REDISMODULE_GET_API(AuthenticateClientWithUser); + REDISMODULE_GET_API(GetCommandKeys); #endif if (RedisModule_IsModuleNameBusy && RedisModule_IsModuleNameBusy(name)) return REDISMODULE_ERR; |