| 145 | } |
| 146 | |
| 147 | bool GroupStatusCache::IsMasterValid(const std::string & master_ip, uint32_t expired_time) { |
| 148 | if (master_ip == "") { |
| 149 | return false; |
| 150 | } |
| 151 | if (expired_time < (uint32_t)time(NULL)) { |
| 152 | return false; |
| 153 | } |
| 154 | return true; |
| 155 | } |
| 156 | |
| 157 | int GroupStatusCache::GetMaster(std::string & master_ip) { |
| 158 | if (std::string(config_->GetSpecifiedMasterIP()) != "") { |
nothing calls this directly
no outgoing calls
no test coverage detected