MCPcopy Create free account
hub / github.com/OpenArkStudio/ARK / LoadRegCenterConfig

Method LoadRegCenterConfig

src/plugin/bus/src/AFCBusModule.cpp:134–152  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

132}
133
134bool AFCBusModule::LoadRegCenterConfig()
135{
136 // load reg center files
137 AFXml xml_doc(REG_CENTER_CONFIG_FILE_PATH);
138
139 auto root_node = xml_doc.GetRootNode();
140 ARK_ASSERT_RET_VAL(root_node.IsValid(), false);
141
142 auto node = root_node.FindNode("center");
143 ARK_ASSERT_RET_VAL(node.IsValid(), false);
144
145 app_config_.reg_center.ip = node.GetString("ip");
146 app_config_.reg_center.port = node.GetUint32("port");
147 app_config_.reg_center.service_name = node.GetString("service_name");
148 app_config_.reg_center.check_interval = node.GetString("check_interval");
149 app_config_.reg_center.check_timeout = node.GetString("check_timeout");
150
151 return true;
152}
153
154const std::string& AFCBusModule::GetAppName(const ARK_APP_TYPE& app_type)
155{

Callers

nothing calls this directly

Calls 5

GetRootNodeMethod · 0.80
IsValidMethod · 0.80
GetUint32Method · 0.80
FindNodeMethod · 0.45
GetStringMethod · 0.45

Tested by

no test coverage detected