22 #include <boost/property_tree/ptree.hpp> 27 #include <zmqpp/zmqpp.hpp> 66 const std::string &remote_pk);
98 const std::list<std::string> &
modules_list() const noexcept;
108 const boost::property_tree::ptree &
module_config(const
std::
string &name) const;
ModuleConfigMap config_map_
Map module name to their config tree.
virtual ~RemoteConfigCollector()=default
ModuleAdditionalFiles additional_files_
const boost::property_tree::ptree & module_config(const std::string &name) const
Returns the configuration for one specific module, identified by name.
This is the header file for a generated source file, GitSHA1.cpp.
std::list< std::string > module_list_
bool fetch_modules_config()
Fetch the conf for all modules (relying on fetch_module_config()).
bool fetch_general_config()
Send the GENERAL_CONFIG command to the remote, and wait for response.
bool fetch_remote_config_version(uint64_t &version)
Fetch the version of the remote configuration.
const std::list< std::string > & modules_list() const noexcept
Return the list of modules that are loaded on the remote host.
boost::property_tree::ptree general_config_
bool fetch_module_list()
Sends the MODULE_LIST command.
RemoteConfigCollector & operator=(const RemoteConfigCollector &)=delete
std::list< std::pair< std::string, std::string > > FileNameContentList
const boost::property_tree::ptree & general_config() const
Returns the tree for the general configuration option.
bool fetch_config(std::string *error_str) noexcept
Fetch the complete remote configuration.
std::map< std::string, FileNameContentList > ModuleAdditionalFiles
Map module name to a list of (file_name, file_content)
bool fetch_module_config(const std::string &module_name)
Sends the MODULE_CONFIG command for the module whose name is module_name.
std::map< std::string, boost::property_tree::ptree > ModuleConfigMap
const FileNameContentList & additional_files(const std::string module) const
std::string remote_endpoint_
RemoteConfigCollector(zmqpp::context_t &ctx, const std::string &remote_endpoint, const std::string &remote_pk)
Construct a new RemoteConfigCollector, this object will work for a one-time config collection...
This class provides an API to collect the configuration of a remote Leosac unit.
const ModuleConfigMap & modules_config() const noexcept
Returns a reference to modules and their configuration.
uint64_t remote_version() const
zmqpp::poller_t poller_
Poll on the socket.