12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- #ifndef __HEPUPLUGHIN_HPP_
- #define __HEPUPLUGHIN_HPP_
- #include <iostream>
- #include <ctime>
- #include <chrono>
- #include "UtilBase.hpp"
- #include "Util/util.h"
- #include "Util/logger.h"
- #include "Util/TimeTicker.h"
- #include "Util/NoticeCenter.h"
- //#include "HttpClient.hpp"
- #include "requests.hpp"
- #include "Hepu.hpp"
- #include "PluginSubscriber.hpp"
- #define HEPU_USR "sunwin"
- #define HEPU_IP "0.0.0.0"
- #define HEPU_PORT 80
- using namespace std;
- using namespace toolkit;
- namespace gsd
- {
- class HepuPlugin: public PluginSubscriber<HepuPlugin>, public PluginBase
- {
- private:
- HepuPlugin(): PluginBase(){
- }
- public:
- using Ptr = std::shared_ptr<HepuPlugin>;
- static std::shared_ptr<HepuPlugin> getPtr();
- bool Init();
- bool StartTask();
- void Destroy();
- void HBThrd();
- bool Alive();
- virtual bool RestPlugin();
- ~HepuPlugin(){}
- protected:
- std::shared_ptr<Hepu> m_hepuClient = nullptr;
- std::shared_ptr<ThreadPool> pool = nullptr;
- bool stop_ = false;
- };
- }
- #endif
|