Created
March 31, 2019 15:50
-
-
Save filipecosta90/d35a0dbe916ecfd744b38461d0968a45 to your computer and use it in GitHub Desktop.
list_extend.c -- step 2 :: RedisModule_OnLoad
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int RedisModule_OnLoad(RedisModuleCtx *ctx, RedisModuleString **argv, int argc) { | |
if (RedisModule_Init(ctx, "list_extend", 1, REDISMODULE_APIVER_1) == REDISMODULE_ERR) | |
return REDISMODULE_ERR; | |
// "write": The command may modify the data set (it may also read from it). | |
// "deny-oom": The command may use additional memory and should be denied during out of memory conditions. | |
if (RedisModule_CreateCommand(ctx, "list_extend.filter", ListExtendFilter_RedisCommand, "write deny-oom", 1, 1, 1) == REDISMODULE_ERR) | |
return REDISMODULE_ERR; | |
return REDISMODULE_OK; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment