Use common constants for monitor and server parameters
The parameter names for monitors and servers now use a set of constant names. This removes some of the errors caused by spelling mistakes when the same parameter name is repeated in multiple places. The service, filter and listener parameters should also be converted to constants. This allows for a consistent user experience.
This commit is contained in:
committed by
Markus Mäkelä
parent
9aa4138705
commit
695a4032ca
@ -33,6 +33,30 @@ MXS_BEGIN_DECLS
|
||||
#define MAX_ADMIN_USER_LEN 1024
|
||||
#define MAX_ADMIN_PW_LEN 1024
|
||||
|
||||
/**
|
||||
* Common configuration parameters names
|
||||
*/
|
||||
extern const char CN_PASSWORD[];
|
||||
extern const char CN_USER[];
|
||||
extern const char CN_ADDRESS[];
|
||||
extern const char CN_NAME[];
|
||||
extern const char CN_PORT[];
|
||||
extern const char CN_MODULE[];
|
||||
extern const char CN_TYPE[];
|
||||
extern const char CN_PROTOCOL[];
|
||||
extern const char CN_DEFAULT[];
|
||||
extern const char CN_SERVERS[];
|
||||
|
||||
extern const char CN_SSL[];
|
||||
extern const char CN_SSL_KEY[];
|
||||
extern const char CN_SSL_CERT[];
|
||||
extern const char CN_SSL_CA_CERT[];
|
||||
extern const char CN_SSL_VERSION[];
|
||||
extern const char CN_SSL_CERT_VERIFY_DEPTH[];
|
||||
|
||||
extern const char CN_AUTHENTICATOR[];
|
||||
extern const char CN_AUTHENTICATOR_OPTIONS[];
|
||||
|
||||
/**
|
||||
* The config parameter
|
||||
*/
|
||||
@ -310,6 +334,4 @@ void config_disable_feedback_task(void);
|
||||
*/
|
||||
bool config_reload(void);
|
||||
|
||||
static const char BACKEND_CONNECT_ATTEMPTS[] = "backend_connect_attempts";
|
||||
|
||||
MXS_END_DECLS
|
||||
|
||||
Reference in New Issue
Block a user