#pragma once #include class UpStream; class UpStreamMgr : public a8::Singleton { private: UpStreamMgr() {}; friend class a8::Singleton; public: void Init(); void UnInit(); UpStream* GetConnByKey(const std::string& key); UpStream* GetConnById(int instance_id); UpStream* RecreateUpStream(const std::string& host, int port); private: unsigned short curr_id_ = 1000; std::map key_hash_; std::map id_hash_; };