MXS-1703 Add and use convenience functions for common macros/fields

Also add debug assert to MariaDBServer ctor.
This commit is contained in:
Esa Korhonen
2018-04-12 16:57:07 +03:00
parent f7cc2aed5a
commit 4d6239635e
4 changed files with 90 additions and 39 deletions

View File

@ -161,6 +161,41 @@ public:
* @return True, if target gtid was reached within allotted time
*/
bool wait_until_gtid(const GtidList& target, int timeout, json_t** err_out);
/**
* Convenience method for SERVER_IS_MASTER
*
* @return True if server is a master
*/
bool is_master() const;
/**
* Convenience method for SERVER_IS_SLAVE
*
* @return True if server is a slave
*/
bool is_slave() const;
/**
* Convenience method for SERVER_IS_RUNNING
*
* @return True if server is running
*/
bool is_running() const;
/**
* Convenience method for SERVER_IS_DOWN
*
* @return True if server is down
*/
bool is_down() const;
/**
* Returns the server name.
*
* @return Server unique name
*/
const char* name() const;
};
/**