Add monitor reconfiguration helper

The MonitorManager function reconfigured a monitor and rolls back to the
old configuration if the new one doesn't work.
This commit is contained in:
Markus Mäkelä
2019-03-26 17:23:50 +02:00
parent 22004702bc
commit 03121c63d4
3 changed files with 35 additions and 18 deletions

View File

@ -149,6 +149,18 @@ public:
*/
static bool monitor_serialize(const mxs::Monitor* monitor);
/**
* Attempt to reconfigure a monitor
*
* If the configuration fails, the old parameters are restored.
*
* @param monitor Monitor to reconfigure
* @param parameters New parameters to apply
*
* @return True if reconfiguration was successful
*/
static bool reconfigure_monitor(mxs::Monitor* monitor, const MXS_CONFIG_PARAMETER& parameters);
/**
* @brief Convert monitor to JSON
*