Add helper functions and default parameters
Added some helper functions into the MaxScale class and default parameters into the connection creation functions. Also made the ip() function const correct.
This commit is contained in:
@ -417,3 +417,17 @@ StringSet Maxscales::get_server_status(const char* name, int m)
|
||||
|
||||
return rval;
|
||||
}
|
||||
|
||||
int Maxscales::port(enum service type, int m) const
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case RWSPLIT:
|
||||
return rwsplit_port[m];
|
||||
case READCONN_MASTER:
|
||||
return readconn_master_port[m];
|
||||
case READCONN_SLAVE:
|
||||
return readconn_slave_port[m];
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user