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

Method info

lib_acl_cpp/src/disque/disque.cpp:428–455  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

426}
427
428bool disque::info(std::map<string, string>& out)
429{
430 size_t argc = 1;
431 const char* argv[1];
432 size_t lens[1];
433
434 argv[0] = "INFO";
435 lens[0] = sizeof("INFO") - 1;
436
437 build_request(argc, argv, lens);
438 string buf;
439 if (get_string(buf) <= 0) {
440 return false;
441 }
442
443 string line;
444 while ((buf.scan_line(line))) {
445 const std::vector<string>& tokens = line.split2(":");
446 if (tokens.size() != 2) {
447 line.clear();
448 continue;
449 }
450 out[tokens[0]] = tokens[1];
451 line.clear();
452 }
453
454 return true;
455}
456
457const std::vector<disque_node*>* disque::hello()
458{

Callers 3

test_infoFunction · 0.45
show_statusMethod · 0.45
get_masters2Method · 0.45

Calls 4

scan_lineMethod · 0.80
build_requestFunction · 0.50
sizeMethod · 0.45
clearMethod · 0.45

Tested by 1

test_infoFunction · 0.36