MCPcopy Create free account
hub / github.com/F-Stack/f-stack / modulesCollectInfo

Function modulesCollectInfo

app/redis-6.2.6/src/module.c:7069–7087  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7067}
7068
7069sds modulesCollectInfo(sds info, const char *section, int for_crash_report, int sections) {
7070 dictIterator *di = dictGetIterator(modules);
7071 dictEntry *de;
7072
7073 while ((de = dictNext(di)) != NULL) {
7074 struct RedisModule *module = dictGetVal(de);
7075 if (!module->info_cb)
7076 continue;
7077 RedisModuleInfoCtx info_ctx = {module, section, info, sections, 0, 0};
7078 module->info_cb(&info_ctx, for_crash_report);
7079 /* Implicitly end dicts (no way to handle errors, and we must add the newline). */
7080 if (info_ctx.in_dict_field)
7081 RM_InfoEndDictField(&info_ctx);
7082 info = info_ctx.info;
7083 sections = info_ctx.sections;
7084 }
7085 dictReleaseIterator(di);
7086 return info;
7087}
7088
7089/* Get information about the server similar to the one that returns from the
7090 * INFO command. This function takes an optional 'section' argument that may

Callers 2

genRedisInfoStringFunction · 0.85
logModulesInfoFunction · 0.85

Calls 4

RM_InfoEndDictFieldFunction · 0.85
dictGetIteratorFunction · 0.70
dictNextFunction · 0.70
dictReleaseIteratorFunction · 0.70

Tested by

no test coverage detected