MXS-2313: Add server ranks

The servers now accept a rank parameter that tells which servers to
prioritize.
This commit is contained in:
Markus Mäkelä
2019-03-08 10:55:00 +02:00
parent 9e9cd0c596
commit 0693514047
5 changed files with 34 additions and 0 deletions

View File

@ -28,6 +28,7 @@ extern const char CN_MONITORUSER[];
extern const char CN_PERSISTMAXTIME[];
extern const char CN_PERSISTPOOLMAX[];
extern const char CN_PROXY_PROTOCOL[];
extern const char CN_RANK[];
/**
* Status bits in the SERVER->status member, which describes the general state of a server. Although the
@ -276,6 +277,13 @@ public:
*/
virtual std::string protocol() const = 0;
/**
* Get server rank
*
* @return The server rank
*/
virtual int rank() const = 0;
/*
* Update server address. TODO: Move this to internal class once blr is gone.
*