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

Method ReadSlaveWorkerConfig

phxsqlproxy/phxsqlproxyconfig.cpp:99–113  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

97}
98
99void PHXSqlProxyConfig::ReadSlaveWorkerConfig(WorkerConfig_t * worker_config) {
100 worker_config->listen_ip_ = svr_ip_.c_str();
101 worker_config->port_ = GetInteger("Server", "SlavePort", 0);
102 worker_config->proxy_port_ = GetInteger("Server", "SlaveProxyPort", 0);
103 worker_config->fork_proc_count_ = GetInteger("Server", "SlaveForkProcCnt", 1);
104 worker_config->worker_thread_count_ = GetInteger("Server", "SlaveWorkerThread", 3);
105 worker_config->io_routine_count_ = GetInteger("Server", "SlaveIORoutineCnt", 1000);
106 if (!worker_config->port_) {
107 worker_config->port_ = svr_port_ + 1;
108 }
109 if (!worker_config->proxy_port_) {
110 worker_config->proxy_port_ = worker_config->port_ + 2;
111 }
112 worker_config->is_master_port_ = false;
113}
114
115const char * PHXSqlProxyConfig::GetSpecifiedMasterIP() {
116 return Option::GetDefault()->GetBinLogSvrConfig()->GetSpecifiedMasterIP();

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected