MCPcopy Create free account
hub / github.com/Tencent/phxsql / IsMasterValid

Method IsMasterValid

phxsqlproxy/group_status_cache.cpp:147–155  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

145}
146
147bool 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
157int GroupStatusCache::GetMaster(std::string & master_ip) {
158 if (std::string(config_->GetSpecifiedMasterIP()) != "") {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected