17 #ifndef LIB_WINSS_SUPERVISE_STATE_FILE_HPP_ 18 #define LIB_WINSS_SUPERVISE_STATE_FILE_HPP_ 24 namespace fs = std::experimental::filesystem;
52 virtual const fs::path&
GetPath()
const;
89 #endif // LIB_WINSS_SUPERVISE_STATE_FILE_HPP_
Definition: case_ignore.hpp:23
virtual bool Read(winss::SuperviseState *state) const
Read the state of the supervisor from the file.
Definition: state_file.cpp:72
virtual const fs::path & GetPath() const
Gets the path of the state file.
Definition: state_file.cpp:37
static const char kStateFile[]
The state file name.
Definition: state_file.hpp:36
The state of the supervisor.
Definition: supervise.hpp:42
virtual bool Notify(winss::SuperviseNotification notification, const winss::SuperviseState &state)
Supervisor listener handler.
Definition: state_file.cpp:41
SuperviseStateFile(fs::path service_dir)
Supervise state file constructor.
Definition: state_file.cpp:33
The supervisor listener.
Definition: supervise.hpp:70
SuperviseNotification
The supervisor events which can occur.
Definition: supervise.hpp:57
Serializes the state file but can also read it as a human-readable message.
Definition: state_file.hpp:31
virtual std::string Format(const winss::SuperviseState &state, bool is_up) const
Format the state as a human-readable string.
Definition: state_file.cpp:125
SuperviseStateFile & operator=(const SuperviseStateFile &)=delete
No copy.