12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091 |
- #ifndef __AUDITPLUGIN_HPP_
- #define __AUDITPLUGIN_HPP_
- #include <iostream>
- #include "UtilBase.hpp"
- #include "Network/Socket.h"
- #include <mutex>
- #include <condition_variable>
- #include <future>
- #include "Util/logger.h"
- #include "Poller/Timer.h"
- #include <vector>
- #include "PluginSubscriber.hpp"
- #include "PuginFactory.hpp"
- using namespace std;
- using namespace toolkit;
- namespace gsd
- {
- class AuditPlugin: public PluginSubscriber<AuditPlugin>, public PluginBase
- {
- private:
- AuditPlugin(): PluginBase(){
- }
- public:
- using Ptr = std::shared_ptr<AuditPlugin>;
-
-
- static std::shared_ptr<AuditPlugin> getPtr();
-
-
- virtual bool Init();
-
-
- virtual bool StartTask();
-
-
- virtual bool Alive();
-
-
- virtual void Destroy();
-
-
- virtual bool RestPlugin(){
- return true;
- }
-
-
- virtual bool PluginTaskCheck();
-
-
- ~AuditPlugin(){
- InfoL;
- this->Destroy();
- }
- private:
- Timer::Ptr timer = nullptr;
- unordered_map<std::string, std::function<std::shared_ptr<PluginBase>()>> map_;
- std::shared_ptr<ThreadPool> pool = nullptr;
- };
- }
- #endif
|