MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / modulesCollectInfo

Function modulesCollectInfo

src/module.cpp:7261–7279  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7259}
7260
7261sds modulesCollectInfo(sds info, const char *section, int for_crash_report, int sections) {
7262 dictIterator *di = dictGetIterator(modules);
7263 dictEntry *de;
7264
7265 while ((de = dictNext(di)) != NULL) {
7266 struct RedisModule *module = (RedisModule*)dictGetVal(de);
7267 if (!module->info_cb)
7268 continue;
7269 RedisModuleInfoCtx info_ctx = {module, section, info, sections, 0, 0};
7270 module->info_cb(&info_ctx, for_crash_report);
7271 /* Implicitly end dicts (no way to handle errors, and we must add the newline). */
7272 if (info_ctx.in_dict_field)
7273 RM_InfoEndDictField(&info_ctx);
7274 info = info_ctx.info;
7275 sections = info_ctx.sections;
7276 }
7277 dictReleaseIterator(di);
7278 return info;
7279}
7280
7281/* Get information about the server similar to the one that returns from the
7282 * 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