| 116 | } |
| 117 | |
| 118 | int 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 | |
| 130 | int PhxBinlogClient::GetGlobalMaster(const vector<string> &iplist, const uint32_t &port, string *ip, |
| 131 | uint32_t *expire_time, uint32_t *version, bool require_majority) { |
nothing calls this directly
no test coverage detected