MCPcopy Create free account
hub / github.com/Tencent/phxqueue / NewGlobalConfig

Method NewGlobalConfig

phxqueue_phxrpc/plugin/configfactory.cpp:45–54  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

43ConfigFactory::~ConfigFactory() {}
44
45unique_ptr<phxqueue::config::GlobalConfig> ConfigFactory::NewGlobalConfig() {
46 QLVerb("path %s", impl_->global_config_path.c_str());
47
48 auto &&conf(new config::GlobalConfig());
49 conf->SetNeedCheck(impl_->need_check);
50 conf->SetFileIfUnset(impl_->global_config_path);
51 if (conf) conf->LoadIfModified();
52
53 return unique_ptr<config::GlobalConfig>(conf);
54}
55
56unique_ptr<phxqueue::config::TopicConfig>
57ConfigFactory::NewTopicConfig(const int topic_id, const string &path) {

Callers

nothing calls this directly

Calls 3

SetFileIfUnsetMethod · 0.80
LoadIfModifiedMethod · 0.80
SetNeedCheckMethod · 0.45

Tested by

no test coverage detected