Move server_set_status and server_clear_status to monitor

The operation goes through monitor code so should be in the according file.
This commit is contained in:
Esa Korhonen
2019-04-26 15:08:31 +03:00
parent b0d8535ead
commit a3bb61486d
8 changed files with 71 additions and 72 deletions

View File

@ -139,6 +139,26 @@ public:
static bool create_monitor_config(const mxs::Monitor* monitor, const char* filename);
/**
* Set a status bit in the server. If the server is monitored, only some bits can be modified,
* and the modification goes through the monitor.
*
* @param bit The bit to set for the server
* @param errmsg_out Error output
* @return True on success
*/
static bool set_server_status(SERVER* srv, int bit, std::string* errmsg_out = NULL);
/**
* Clear a status bit in the server. If the server is monitored, only some bits can be modified,
* and the modification goes through the monitor.
*
* @param bit The bit to clear for the server
* @param errmsg_out Error output
* @return True on success
*/
static bool clear_server_status(SERVER* srv, int bit, std::string* errmsg_out);
/**
* Waits until all running monitors have advanced one tick.
*/