Add readwritesplit options to diagnostic output

This helps detect the state of the loaded configuration.
This commit is contained in:
Markus Mäkelä
2017-01-27 10:02:33 +02:00
parent 6f24502e14
commit 50cffed5b2
3 changed files with 92 additions and 10 deletions

View File

@ -113,4 +113,26 @@ typedef enum
TYPE_ALL
} mxs_target_t;
/**
* @brief Convert mxs_target_t to a string
*
* @param target Target to convert
*
* @return Target type as string
*/
static inline const char* mxs_target_to_str(mxs_target_t target)
{
switch (target)
{
case TYPE_MASTER:
return "master";
case TYPE_ALL:
return "all";
default:
return "UNDEFINED";
}
}
MXS_END_DECLS