#include "client/Client.h"
#include "common/LogClient.h"
#include "mon/MgrMap.h"
+#include "mon/MonCommand.h"
#include "DaemonState.h"
#include "ClusterState.h"
class ServeThread;
+class health_check_map_t;
class PyModules
{
Client &client;
Finisher &finisher;
- mutable Mutex lock{"PyModules"};
+ mutable Mutex lock{"PyModules::lock"};
std::string get_site_packages();
const std::string &svc_name,
const std::string &svc_id,
const std::string &path);
+ PyObject *get_perf_schema_python(
+ const std::string &handle,
+ const std::string svc_type,
+ const std::string &svc_id);
PyObject *get_context();
std::map<std::string, std::string> config_cache;
- std::vector<ModuleCommand> get_commands();
+ // Python command definitions, including callback
+ std::vector<ModuleCommand> get_py_commands() const;
+
+ // Monitor command definitions, suitable for CLI
+ std::vector<MonCommand> get_commands() const;
void insert_config(const std::map<std::string, std::string> &new_config);
void set_config(const std::string &handle,
const std::string &key, const std::string &val);
+ void set_health_checks(const std::string& handle,
+ health_check_map_t&& checks);
+ void get_health_checks(health_check_map_t *checks);
+
void log(const std::string &handle,
int level, const std::string &record);