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

Function streamLookupCG

app/redis-6.2.6/src/t_stream.c:2289–2294  ·  view source on GitHub ↗

Lookup the consumer group in the specified stream and returns its * pointer, otherwise if there is no such group, NULL is returned. */

Source from the content-addressed store, hash-verified

2287/* Lookup the consumer group in the specified stream and returns its
2288 * pointer, otherwise if there is no such group, NULL is returned. */
2289streamCG *streamLookupCG(stream *s, sds groupname) {
2290 if (s->cgroups == NULL) return NULL;
2291 streamCG *cg = raxFind(s->cgroups,(unsigned char*)groupname,
2292 sdslen(groupname));
2293 return (cg == raxNotFound) ? NULL : cg;
2294}
2295
2296/* Lookup the consumer with the specified name in the group 'cg': if the
2297 * consumer does not exist it is created unless SLC_NOCREAT flag was specified.

Callers 8

xreadCommandFunction · 0.85
xgroupCommandFunction · 0.85
xackCommandFunction · 0.85
xpendingCommandFunction · 0.85
xclaimCommandFunction · 0.85
xautoclaimCommandFunction · 0.85
xinfoCommandFunction · 0.85

Calls 2

raxFindFunction · 0.85
sdslenFunction · 0.85

Tested by

no test coverage detected