| | |
| | | const MQId kBHTopicReqRepCenter = boost::uuids::string_generator()("12345670-89ab-cdef-8349-1234567890ff"); |
| | | const MQId kBHUniCenter = boost::uuids::string_generator()("87654321-89ab-cdef-8349-1234567890ff"); |
| | | |
| | | struct LastError { |
| | | int ec_ = 0; |
| | | std::string msg_; |
| | | }; |
| | | |
| | | LastError &LastErrorStore() |
| | | { |
| | | thread_local LastError le; |
| | | return le; |
| | | } |
| | | |
| | | } // namespace |
| | | |
| | | const MQId &BHTopicBusAddress() { return kBHTopicBus; } |
| | | const MQId &BHTopicCenterAddress() { return kBHTopicReqRepCenter; } |
| | | const MQId &BHUniCenterAddress() { return kBHUniCenter; } |
| | | |
| | | void SetLastError(const int ec, const std::string &msg) |
| | | { |
| | | LastErrorStore().ec_ = ec; |
| | | LastErrorStore().msg_ = msg; |
| | | } |
| | | |
| | | void GetLastError(int &ec, std::string &msg) |
| | | { |
| | | ec = LastErrorStore().ec_; |
| | | msg = LastErrorStore().msg_; |
| | | } |