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

Method IsMember

phxsqlproxy/group_status_cache.cpp:177–185  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

175}
176
177bool GroupStatusCache::IsMember(const std::string & ip) {
178 RWLockManager lock(&membership_mutex_, RWLockManager::READ);
179 for (auto & itr : membership_) {
180 if (itr == ip) {
181 return true;
182 }
183 }
184 return false;
185}
186
187int GroupStatusCache::GetSlave(const std::string & master_ip, std::string & slave_ip) {
188 RWLockManager lock(&membership_mutex_, RWLockManager::READ);

Callers 2

IsProxyHeaderNeedMethod · 0.80
FakeClientIPInAuthBufMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected