MXS-2271 Move free monitor functions into classes

Functions are divided to MonitorManager, Monitor, or the monitored
server.
This commit is contained in:
Esa Korhonen
2019-03-06 14:41:06 +02:00
parent 40f24aaaee
commit a8949b2560
13 changed files with 138 additions and 148 deletions

View File

@ -127,6 +127,28 @@ public:
* @param monitor The monitor to stop
*/
static void monitor_stop(Monitor*);
/**
* Get links to monitors that relate to a server.
*
* @param server Server to inspect
* @param host Hostname of this server
* @return Array of monitor links or NULL if no relations exist
*/
static json_t* monitor_relations_to_server(const SERVER* server, const char* host);
/**
* Convert all monitors to JSON.
*
* @param host Hostname of this server
* @return JSON array containing all monitors
*/
static json_t* monitor_list_to_json(const char* host);
/**
* Waits until all running monitors have advanced one tick.
*/
static void monitor_debug_wait();
};