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

Method GetTopicIDByTopicName

phxqueue/config/globalconfig.cpp:126–133  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

124}
125
126comm::RetCode GlobalConfig::GetTopicIDByTopicName(const string &topic_name, int &topic_id) const {
127 auto &&it = impl_->topic_name2topic_id.find(topic_name);
128 if (it == impl_->topic_name2topic_id.end()) {
129 return comm::RetCode::RET_ERR_RANGE_TOPIC;
130 }
131 topic_id = it->second;
132 return comm::RetCode::RET_OK;
133}
134
135comm::RetCode GlobalConfig::GetTopicConfigByTopicID(const int topic_id, shared_ptr<const TopicConfig> &topic_config) {
136 topic_config = nullptr;

Callers 4

InitTopicIDMethod · 0.80
InitTopicIDMethod · 0.80
InitTopicIDMethod · 0.80
RunMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected