Allow passing arguments to modules on load.

This commit is contained in:
Yossi Gottlieb
2016-06-05 10:03:34 +03:00
parent 550fa7e14f
commit 2bd13cf0eb
3 changed files with 46 additions and 13 deletions

View File

@ -683,6 +683,12 @@ struct saveparam {
int changes;
};
struct loadmodule {
sds path;
int argc;
sds argv[];
};
struct sharedObjectsStruct {
robj *crlf, *ok, *err, *emptybulk, *czero, *cone, *cnegone, *pong, *space,
*colon, *nullbulk, *nullmultibulk, *queued,
@ -1156,7 +1162,7 @@ extern dictType modulesDictType;
/* Modules */
void moduleInitModulesSystem(void);
int moduleLoad(const char *path);
int moduleLoad(const char *path, void **argv, int argc);
void moduleLoadFromQueue(void);
int *moduleGetCommandKeysViaAPI(struct redisCommand *cmd, robj **argv, int argc, int *numkeys);
moduleType *moduleTypeLookupModuleByID(uint64_t id);