lintel 0.2.0
Loading...
Searching...
No Matches
ProcessComponent.h
Go to the documentation of this file.
1#ifndef LINTEL_PROCESSCOMPONENT_H
2#define LINTEL_PROCESSCOMPONENT_H
3
4#include <tinyxml2.h>
5
8
9namespace lintel {
12{
13private:
15 static const struct Shapes
16 {
17 const char *const CONFIG_ROOT = "Processes";
18 const char *const PROCESS_ROOT = "Process";
19 const char *const PROCESS_NAME = "name";
20 const char *const PROCESS_AUTO_RESTART = "autoRestart";
21 const char *const PROCESS_ARGS = "args";
22 const char *const PROCESS_MAX_RESTARTS = "maxRestarts";
23 const char *const PROCESS_CONFIG = "config";
24 const char *const PROCESS_GROUP_ROOT = "ProcessGroup";
25 const char *const PROCESS_GROUP_NAME = "name";
26 // automation policy
27 const char *const PROCESS_RESTART_DELAY = "restartDelay";
28 const char *const PROCESS_RESTART_DELAY_MAX = "restartDelayMax";
29 const char *const PROCESS_MIN_UPTIME = "minUptime";
30 const char *const PROCESS_MAX_RESTART_RATE = "maxRestartRate";
31 const char *const PROCESS_RESTART_WINDOW = "restartWindow";
32 const char *const PROCESS_RESTART_INTERVAL = "restartInterval";
33 const char *const PROCESS_ACTIVE_FROM = "activeFrom";
34 const char *const PROCESS_ACTIVE_TO = "activeTo";
35 const char *const PROCESS_CPU_NOTIFY = "cpuNotify";
36 const char *const PROCESS_MEMORY_NOTIFY = "memNotify";
37 } m_shapes;
38
43 std::shared_ptr<Entry> parseProcess(tinyxml2::XMLElement *processElement, int32_t lineOffset);
44
49 std::shared_ptr<Entry> parseProcessGroup(tinyxml2::XMLElement *processGroupElement, int32_t lineOffset);
50
51public:
54
60 std::vector<std::shared_ptr<Entry>>
61 parse(const std::string &content, int32_t lineOffset, const std::string &fileName) override;
62};
63
64}// namespace lintel
65#endif// LINTEL_PROCESSCOMPONENT_H
Definition Component.h:13
Definition ProcessComponent.h:12
std::vector< std::shared_ptr< Entry > > parse(const std::string &content, int32_t lineOffset, const std::string &fileName) override
Definition BaseFeature.h:6
constexpr std::string_view type_name()
Definition TypeName.h:9