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

Method get_slave

lib_acl_cpp/src/redis/redis_cluster.cpp:684–698  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

682}
683
684redis_node* redis_cluster::get_slave(const std::vector<string>& tokens)
685{
686 if (tokens.size() < 8) {
687 return NULL;
688 }
689
690 redis_node* node = NEW redis_node;
691 node->set_id(tokens[0].c_str());
692 node->set_addr(tokens[1].c_str());
693 node->set_myself(false);
694 node->set_connected(strcasecmp(tokens[7].c_str(), "connected") == 0);
695 node->set_master_id(tokens[3].c_str());
696 node->set_type("slave");
697 return node;
698}
699
700void redis_cluster::free_slaves()
701{

Callers

nothing calls this directly

Calls 5

sizeMethod · 0.45
set_idMethod · 0.45
c_strMethod · 0.45
set_addrMethod · 0.45
set_typeMethod · 0.45

Tested by

no test coverage detected