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

Method GetLocalMaster

phxbinlogsvr/framework/rpccomm/phxbinlog_client.cpp:118–128  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

116}
117
118int PhxBinlogClient::GetLocalMaster(string *ip, uint32_t *expire_time, uint32_t *version) {
119 string resp_buffer;
120 int ret = stub_interface_->GetMasterInfoFromLocal(&resp_buffer);
121 if (ret == 0) {
122 if (!DecodeMasterInfo(resp_buffer, ip, expire_time, version)) {
123 ColorLogError("%s:%d decode fail", __func__, __LINE__);
124 return phxbinlog::BUFFER_FAIL;
125 }
126 }
127 return ret;
128}
129
130int PhxBinlogClient::GetGlobalMaster(const vector<string> &iplist, const uint32_t &port, string *ip,
131 uint32_t *expire_time, uint32_t *version, bool require_majority) {

Callers

nothing calls this directly

Calls 2

ColorLogErrorFunction · 0.85

Tested by

no test coverage detected