Initial version

This commit is contained in:
Alexander Kobjolke 2022-02-26 00:23:43 +01:00
commit 04b878f078
28 changed files with 1771 additions and 0 deletions

View file

@ -0,0 +1,31 @@
#ifndef PROCESS_LIBPROCESS_EXT_INCLUDE_NODE_CHECKER_HPP
#define PROCESS_LIBPROCESS_EXT_INCLUDE_NODE_CHECKER_HPP
#include <process/watchdog.hpp>
#include "node_statistic.hpp"
#include <memory>
namespace process::controller {
class NodeOSInterface;
class NodeCheckerCallback {
public:
virtual void on_node_statistic_changed(const ::process::controller::NodeStatistic& ps) = 0;
};
class NodeChecker : public WatchdogChecker<NodeCheckerCallback> {
public:
//TODO default OSInterface in constructor, here should be nullptr if there are include problems/forward declare?
NodeChecker(std::shared_ptr<NodeCheckerCallback> cb,
std::shared_ptr<NodeOSInterface> interface = nullptr);
void check() override;
protected:
std::shared_ptr<NodeOSInterface> m_interface;
::process::controller::NodeStatistic m_stat;
};
}
#endif