MXS-1703 Move monitor main loop + other entrypoint contents to class methods

This commit is contained in:
Esa Korhonen
2018-03-13 14:06:48 +02:00
parent 3999bed3e2
commit fb55ea6015
2 changed files with 168 additions and 137 deletions

View File

@ -73,6 +73,25 @@ private:
public:
// TODO: Once done refactoring, see which of these can be moved to private.
/**
* Print diagnostics.
*
* @param dcb DCB to print to
*/
void diagnostics(DCB *dcb) const;
/**
* Print diagnostics to json object.
*
* @return Diagnostics messages
*/
json_t* diagnostics_json() const;
/**
* Runs the main monitor loop. Called from the static monitorMain()-function.
*/
void main_loop();
/**
* Start the monitor instance and return the instance data, creating it if starting for the first time.
* This function creates a thread to execute the monitoring.