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

Method GetEndPoint

phxsqlclient/phxsqlclientbase.cpp:75–81  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

73}
74
75int PhxSQLClientDisasterStrategy::GetEndPoint(const std::vector<MySQLEndPoint_t> & vecMySQLEndPoints,
76 const MySQLEndPoint_t & tPreviousEndPoint, MySQLEndPoint_t & tEndPoint) {
77 int iRandomIdx = phxsql::RandomPicker(vecMySQLEndPoints.size());
78 tEndPoint.m_sMySQLIP = vecMySQLEndPoints[iRandomIdx].m_sMySQLIP;
79 tEndPoint.m_iPort = vecMySQLEndPoints[iRandomIdx].m_iPort;
80 return phxsql::OK;
81}
82
83////////////////////////////////////////
84void PhxSQLClientBase::InitProperty(MySQLProp_t * poProperty) {

Callers 1

ConnectMethod · 0.45

Calls 1

RandomPickerFunction · 0.85

Tested by

no test coverage detected