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

Function clusterManagerNodeFlagString

app/redis-6.2.6/src/redis-cli.c:3150–3165  ·  view source on GitHub ↗

Return a representable string of the node's flags */

Source from the content-addressed store, hash-verified

3148
3149/* Return a representable string of the node's flags */
3150static sds clusterManagerNodeFlagString(clusterManagerNode *node) {
3151 sds flags = sdsempty();
3152 if (!node->flags_str) return flags;
3153 int empty = 1;
3154 listIter li;
3155 listNode *ln;
3156 listRewind(node->flags_str, &li);
3157 while ((ln = listNext(&li)) != NULL) {
3158 sds flag = ln->value;
3159 if (strcmp(flag, "myself") == 0) continue;
3160 if (!empty) flags = sdscat(flags, ",");
3161 flags = sdscatfmt(flags, "%S", flag);
3162 empty = 0;
3163 }
3164 return flags;
3165}
3166
3167/* Return a representable string of the node's slots */
3168static sds clusterManagerNodeSlotsString(clusterManagerNode *node) {

Callers 2

clusterManagerNodeInfoFunction · 0.85

Calls 6

sdsemptyFunction · 0.85
listRewindFunction · 0.85
listNextFunction · 0.85
strcmpFunction · 0.85
sdscatFunction · 0.85
sdscatfmtFunction · 0.85

Tested by

no test coverage detected