MXS-2220 Run uncrustify on server headers
This commit is contained in:
@ -75,20 +75,20 @@ public:
|
||||
|
||||
struct Version
|
||||
{
|
||||
uint64_t total = 0; /**< The version number received from server */
|
||||
uint32_t major = 0; /**< Major version */
|
||||
uint32_t minor = 0; /**< Minor version */
|
||||
uint32_t patch = 0; /**< Patch version */
|
||||
uint64_t total = 0; /**< The version number received from server */
|
||||
uint32_t major = 0; /**< Major version */
|
||||
uint32_t minor = 0; /**< Minor version */
|
||||
uint32_t patch = 0; /**< Patch version */
|
||||
};
|
||||
|
||||
// Base settings
|
||||
char address[MAX_ADDRESS_LEN] = {'\0'}; /**< Server hostname/IP-address */
|
||||
int port = -1; /**< Server port */
|
||||
int extra_port = -1; /**< Alternative monitor port if normal port fails */
|
||||
char address[MAX_ADDRESS_LEN] = {'\0'}; /**< Server hostname/IP-address */
|
||||
int port = -1; /**< Server port */
|
||||
int extra_port = -1; /**< Alternative monitor port if normal port fails */
|
||||
|
||||
// Other settings
|
||||
bool proxy_protocol = false; /**< Send proxy-protocol header to backends when connecting
|
||||
* routing sessions. */
|
||||
bool proxy_protocol = false; /**< Send proxy-protocol header to backends when connecting
|
||||
* routing sessions. */
|
||||
|
||||
// Base variables
|
||||
bool is_active = false; /**< Server is active and has not been "destroyed" */
|
||||
@ -103,9 +103,9 @@ public:
|
||||
int64_t triggered_at = 0; /**< Time when the last event was triggered */
|
||||
|
||||
// Status descriptors. Updated automatically by a monitor or manually by the admin
|
||||
uint64_t status = 0; /**< Current status flag bitmap */
|
||||
int maint_request = MAINTENANCE_NO_CHANGE; /**< Is admin requesting Maintenance=ON/OFF on the
|
||||
* server? */
|
||||
uint64_t status = 0; /**< Current status flag bitmap */
|
||||
int maint_request = MAINTENANCE_NO_CHANGE; /**< Is admin requesting Maintenance=ON/OFF on the
|
||||
* server? */
|
||||
|
||||
long node_id = -1; /**< Node id, server_id for M/S or local_index for Galera */
|
||||
long master_id = -1; /**< Master server id of this node */
|
||||
@ -458,13 +458,13 @@ bool server_set_disk_space_threshold(SERVER* server, const char* disk_space_thre
|
||||
*/
|
||||
void server_add_response_average(SERVER* server, double ave, int num_samples);
|
||||
|
||||
extern int server_free(SERVER* server);
|
||||
extern SERVER* server_find_by_unique_name(const char* name);
|
||||
extern int server_find_by_unique_names(char** server_names, int size, SERVER*** output);
|
||||
extern void server_clear_set_status_nolock(SERVER* server, uint64_t bits_to_clear, uint64_t bits_to_set);
|
||||
extern void server_set_status_nolock(SERVER* server, uint64_t bit);
|
||||
extern void server_clear_status_nolock(SERVER* server, uint64_t bit);
|
||||
extern void server_transfer_status(SERVER* dest_server, const SERVER* source_server);
|
||||
extern int server_free(SERVER* server);
|
||||
extern SERVER* server_find_by_unique_name(const char* name);
|
||||
extern int server_find_by_unique_names(char** server_names, int size, SERVER*** output);
|
||||
extern void server_clear_set_status_nolock(SERVER* server, uint64_t bits_to_clear, uint64_t bits_to_set);
|
||||
extern void server_set_status_nolock(SERVER* server, uint64_t bit);
|
||||
extern void server_clear_status_nolock(SERVER* server, uint64_t bit);
|
||||
extern void server_transfer_status(SERVER* dest_server, const SERVER* source_server);
|
||||
extern void server_update_address(SERVER* server, const char* address);
|
||||
extern uint64_t server_map_status(const char* str);
|
||||
|
||||
|
@ -274,25 +274,25 @@ public:
|
||||
std::string monitor_password() const;
|
||||
|
||||
mutable std::mutex m_lock;
|
||||
DCB** persistent = nullptr; /**< List of unused persistent connections to the server */
|
||||
DCB** persistent = nullptr;/**< List of unused persistent connections to the server */
|
||||
|
||||
private:
|
||||
struct Settings
|
||||
{
|
||||
mutable std::mutex lock; /**< Protects array-like settings from concurrent access */
|
||||
mutable std::mutex lock; /**< Protects array-like settings from concurrent access */
|
||||
|
||||
/** All config settings in text form. This is only read and written from the admin thread
|
||||
* so no need for locking. */
|
||||
std::vector<ConfigParameter> all_parameters;
|
||||
|
||||
std::string protocol; /**< Backend protocol module name. Does not change so needs no locking. */
|
||||
std::string authenticator; /**< Authenticator module name. Does not change so needs no locking. */
|
||||
std::string protocol; /**< Backend protocol module name. Does not change so needs no locking. */
|
||||
std::string authenticator; /**< Authenticator module name. Does not change so needs no locking. */
|
||||
|
||||
char monuser[MAX_MONUSER_LEN + 1] = {'\0'}; /**< Monitor username, overrides monitor setting */
|
||||
char monpw[MAX_MONPW_LEN + 1] = {'\0'}; /**< Monitor password, overrides monitor setting */
|
||||
|
||||
long persistpoolmax = 0; /**< Maximum size of persistent connections pool */
|
||||
long persistmaxtime = 0; /**< Maximum number of seconds connection can live */
|
||||
long persistpoolmax = 0; /**< Maximum size of persistent connections pool */
|
||||
long persistmaxtime = 0; /**< Maximum number of seconds connection can live */
|
||||
|
||||
/** Disk space thresholds. Can be queried from modules at any time so access must be protected
|
||||
* by mutex. */
|
||||
@ -318,21 +318,22 @@ private:
|
||||
*/
|
||||
void set(uint64_t version_num, const std::string& version_string);
|
||||
|
||||
Version version_num() const;
|
||||
Type type() const;
|
||||
Version version_num() const;
|
||||
Type type() const;
|
||||
std::string version_string() const;
|
||||
|
||||
private:
|
||||
mutable std::mutex m_lock; /**< Protects against concurrent writing */
|
||||
Version m_version_num; /**< Numeric version */
|
||||
Type m_type = Type::MARIADB; /**< Server type */
|
||||
char m_version_str[MAX_VERSION_LEN + 1] = {'\0'}; /**< Server version string */
|
||||
mutable std::mutex m_lock; /**< Protects against concurrent writing */
|
||||
|
||||
Version m_version_num; /**< Numeric version */
|
||||
Type m_type = Type::MARIADB; /**< Server type */
|
||||
char m_version_str[MAX_VERSION_LEN + 1] = {'\0'};/**< Server version string */
|
||||
};
|
||||
|
||||
const std::string m_name; /**< Server config name */
|
||||
Settings m_settings; /**< Server settings */
|
||||
VersionInfo info; /**< Server version and type information */
|
||||
maxbase::EMAverage m_response_time; /**< Response time calculations for this server */
|
||||
const std::string m_name; /**< Server config name */
|
||||
Settings m_settings; /**< Server settings */
|
||||
VersionInfo info; /**< Server version and type information */
|
||||
maxbase::EMAverage m_response_time; /**< Response time calculations for this server */
|
||||
};
|
||||
|
||||
void server_free(Server* server);
|
||||
|
Reference in New Issue
Block a user