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

Method ReadMasterWorkerConfig

phxsqlproxy/phxsqlproxyconfig.cpp:86–97  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

84}
85
86void PHXSqlProxyConfig::ReadMasterWorkerConfig(WorkerConfig_t * worker_config) {
87 worker_config->listen_ip_ = svr_ip_.c_str();
88 worker_config->port_ = svr_port_;
89 worker_config->proxy_port_ = GetInteger("Server", "MasterProxyPort", 0);
90 worker_config->fork_proc_count_ = GetInteger("Server", "MasterForkProcCnt", 1);
91 worker_config->worker_thread_count_ = GetInteger("Server", "MasterWorkerThread", 3);
92 worker_config->io_routine_count_ = GetInteger("Server", "MasterIORoutineCnt", 1000);
93 if (!worker_config->proxy_port_) {
94 worker_config->proxy_port_ = worker_config->port_ + 2;
95 }
96 worker_config->is_master_port_ = true;
97}
98
99void PHXSqlProxyConfig::ReadSlaveWorkerConfig(WorkerConfig_t * worker_config) {
100 worker_config->listen_ip_ = svr_ip_.c_str();

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected