Class Monitor
Defined in File monitor.hpp
Inheritance Relationships
Derived Types
public FromHostMonitor(Class FromHostMonitor)public ToHostMonitor(Class ToHostMonitor)
Class Documentation
-
class Monitor
Generic class to write JSON strings containing monitoring information in UNIX FIFOs.
Subclassed by FromHostMonitor, ToHostMonitor
Public Functions
-
inline explicit Monitor(std::unique_ptr<Writer> writer)
Constructor to initialize the Monitor with a Writer.
- Parameters:
writer -- Unique pointer to a Writer object.
-
virtual ~Monitor() = default
Virtual destructor.
-
inline std::string get_serialized_message()
Get the serialized JSON message as a string.
- Returns:
Serialized JSON message.
-
inline void write_message()
Write the JSON message using a Writer.
-
inline void create_new_message(const std::string &hostname)
Create a new JSON message, initializing it with the given timestamp and hostname.
- Parameters:
hostname -- The hostname for the new message.
-
inline explicit Monitor(std::unique_ptr<Writer> writer)