| 44 | } |
| 45 | |
| 46 | connect_pool* redis_client_cluster::create_pool(const char* addr, |
| 47 | size_t count, size_t idx) |
| 48 | { |
| 49 | redis_client_pool* pool = NEW redis_client_pool(addr, count, idx); |
| 50 | |
| 51 | if (ssl_conf_) { |
| 52 | pool->set_ssl_conf(ssl_conf_); |
| 53 | } |
| 54 | |
| 55 | string key(addr); |
| 56 | key.lower(); |
| 57 | std::map<string, string>::const_iterator cit; |
| 58 | if ((cit = passwds_.find(key)) != passwds_.end() |
| 59 | || (cit = passwds_.find("default")) != passwds_.end()) { |
| 60 | |
| 61 | pool->set_password(cit->second.c_str()); |
| 62 | } |
| 63 | |
| 64 | return pool; |
| 65 | } |
| 66 | |
| 67 | redis_client_pool* redis_client_cluster::peek_slot(int slot) |
| 68 | { |
nothing calls this directly
no test coverage detected