You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
in valkey 7, config rewrite support rewrite modules as loadmodule options into config file.
I'll register some commands to modify the parameters of the module at runtime. How can I ensure that the module parameter written into the configuration file during config rewrite is the modified one?
I see in the code that the parameters of the module are read in loadmod->argv[i]->ptr. Is there any way to affect this variable in the module?
for (int i = 0; i < module->loadmod->argc; i++) {
line = sdscatlen(line, "", 1);
line = sdscatsds(line, module->loadmod->argv[i]->ptr);
}
Should I save the argv parameter in the module when ValkeyModule_OnLoad?
ValkeyModule_OnLoad(void *ctx, ValkeyModuleString **argv, int argc)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
in valkey 7, config rewrite support rewrite modules as loadmodule options into config file.
I'll register some commands to modify the parameters of the module at runtime. How can I ensure that the module parameter written into the configuration file during config rewrite is the modified one?
I see in the code that the parameters of the module are read in loadmod->argv[i]->ptr. Is there any way to affect this variable in the module?
Should I save the argv parameter in the module when ValkeyModule_OnLoad?
Beta Was this translation helpful? Give feedback.
All reactions