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

Method GetConsumerByAddr

phxqueue/config/consumerconfig.cpp:97–103  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

95}
96
97comm::RetCode ConsumerConfig::GetConsumerByAddr(const comm::proto::Addr &addr, shared_ptr<const proto::Consumer> &consumer) const {
98 auto &&encoded_addr = comm::utils::EncodeAddr(addr);
99 auto &&it = impl_->addr2consumer.find(encoded_addr);
100 if (impl_->addr2consumer.end() == it) return comm::RetCode::RET_ERR_RANGE_ADDR;
101 consumer = it->second;
102 return comm::RetCode::RET_OK;
103}
104
105
106} // namespace config

Callers 3

CheckConsumerConfigMethod · 0.80
TestConsumerConfigMethod · 0.80
GetSubIDsByConsumerAddrFunction · 0.80

Calls 1

EncodeAddrFunction · 0.85

Tested by 2

CheckConsumerConfigMethod · 0.64
TestConsumerConfigMethod · 0.64