MXS-2313: Expose only two rank values

The rank can now only be used to define two groups of servers: primary and
secondary servers. This limits the exposure and reduces the number of
possibilities that can arise from the use of this parameter thus making it
more predictable.
This commit is contained in:
Markus Mäkelä
2019-03-13 09:45:00 +02:00
parent 6f8bfd7d11
commit 3eef2648e1
4 changed files with 23 additions and 4 deletions

View File

@ -19,6 +19,7 @@
#include <unordered_map>
#include <maxbase/average.hh>
#include <maxscale/ssl.hh>
#include <maxscale/modinfo.h>
/**
* Server configuration parameters names
@ -30,6 +31,12 @@ extern const char CN_PERSISTPOOLMAX[];
extern const char CN_PROXY_PROTOCOL[];
extern const char CN_RANK[];
// The enum values for `rank`
extern const MXS_ENUM_VALUE rank_values[];
// Default value for `rank`
extern const char* DEFAULT_RANK;
/**
* Status bits in the SERVER->status member, which describes the general state of a server. Although the
* individual bits are independent, not all combinations make sense or are used. The bitfield is 64bits wide.