MCPcopy Create free account
hub / github.com/acl-dev/acl / xrange

Function xrange

lib_acl_cpp/samples/redis/redis_stream/redis_stream.cpp:339–358  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

337}
338
339static void xrange(acl::redis_stream& redis, size_t count)
340{
341 acl::redis_stream_messages messages;
342
343 if (redis.xrange(messages, __key, "-", "+", count) == false) {
344 printf("xrange error=%s, key=%lu\r\n",
345 redis.result_error(), (unsigned long) count);
346 return;
347 }
348
349 printf("xrange ok, key=%s\r\n", __key.c_str());
350
351 if (messages.empty()) {
352 printf("no messages\r\n");
353 const acl::string* req = redis.request_buf();
354 printf("request=[%s]\r\n", req ? req->c_str() : "NULL");
355 } else {
356 show_messages(messages);
357 }
358}
359
360static void xrevrange(acl::redis_stream& redis, size_t count)
361{

Callers 1

mainFunction · 0.85

Calls 5

show_messagesFunction · 0.85
xrangeMethod · 0.80
result_errorMethod · 0.80
c_strMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…