Rename MXS_MONITOR_SERVERS to MXS_MONITORED_SERVER
An element in a linked list is not a list.
This commit is contained in:
@ -161,7 +161,7 @@ typedef enum
|
||||
/**
|
||||
* The linked list of servers that are being monitored by the monitor module.
|
||||
*/
|
||||
typedef struct monitor_servers
|
||||
typedef struct monitored_server
|
||||
{
|
||||
SERVER *server; /**< The server being monitored */
|
||||
MYSQL *con; /**< The MySQL connection */
|
||||
@ -169,8 +169,8 @@ typedef struct monitor_servers
|
||||
int mon_err_count;
|
||||
unsigned int mon_prev_status;
|
||||
unsigned int pending_status; /**< Pending Status flag bitmap */
|
||||
struct monitor_servers *next; /**< The next server in the list */
|
||||
} MXS_MONITOR_SERVERS;
|
||||
struct monitored_server *next; /**< The next server in the list */
|
||||
} MXS_MONITORED_SERVER;
|
||||
|
||||
/**
|
||||
* Representation of the running monitor.
|
||||
@ -182,7 +182,7 @@ struct mxs_monitor
|
||||
char password[MAX_MONITOR_PASSWORD_LEN]; /*< Monitor password */
|
||||
SPINLOCK lock;
|
||||
MXS_CONFIG_PARAMETER* parameters; /*< configuration parameters */
|
||||
MXS_MONITOR_SERVERS* databases; /*< List of databases the monitor monitors */
|
||||
MXS_MONITORED_SERVER* databases; /*< List of databases the monitor monitors */
|
||||
monitor_state_t state; /**< The state of the monitor */
|
||||
int connect_timeout; /**< Connect timeout in seconds for mysql_real_connect */
|
||||
int connect_attempts; /**< How many times a connection is attempted */
|
||||
@ -255,16 +255,16 @@ extern const char CN_EVENTS[];
|
||||
|
||||
bool check_monitor_permissions(MXS_MONITOR* monitor, const char* query);
|
||||
|
||||
void monitor_clear_pending_status(MXS_MONITOR_SERVERS *ptr, int bit);
|
||||
void monitor_set_pending_status(MXS_MONITOR_SERVERS *ptr, int bit);
|
||||
void monitor_clear_pending_status(MXS_MONITORED_SERVER *ptr, int bit);
|
||||
void monitor_set_pending_status(MXS_MONITORED_SERVER *ptr, int bit);
|
||||
void servers_status_pending_to_current(MXS_MONITOR *monitor);
|
||||
void servers_status_current_to_pending(MXS_MONITOR *monitor);
|
||||
|
||||
bool mon_status_changed(MXS_MONITOR_SERVERS* mon_srv);
|
||||
bool mon_print_fail_status(MXS_MONITOR_SERVERS* mon_srv);
|
||||
bool mon_status_changed(MXS_MONITORED_SERVER* mon_srv);
|
||||
bool mon_print_fail_status(MXS_MONITORED_SERVER* mon_srv);
|
||||
|
||||
mxs_connect_result_t mon_ping_or_connect_to_db(MXS_MONITOR* mon, MXS_MONITOR_SERVERS *database);
|
||||
void mon_log_connect_error(MXS_MONITOR_SERVERS* database, mxs_connect_result_t rval);
|
||||
mxs_connect_result_t mon_ping_or_connect_to_db(MXS_MONITOR* mon, MXS_MONITORED_SERVER *database);
|
||||
void mon_log_connect_error(MXS_MONITORED_SERVER* database, mxs_connect_result_t rval);
|
||||
|
||||
void lock_monitor_servers(MXS_MONITOR *monitor);
|
||||
void release_monitor_servers(MXS_MONITOR *monitor);
|
||||
@ -295,7 +295,7 @@ void mon_hangup_failed_servers(MXS_MONITOR *monitor);
|
||||
*
|
||||
* @param db Database where the query failed
|
||||
*/
|
||||
void mon_report_query_error(MXS_MONITOR_SERVERS* db);
|
||||
void mon_report_query_error(MXS_MONITORED_SERVER* db);
|
||||
|
||||
/**
|
||||
* @brief Convert monitor to JSON
|
||||
@ -332,7 +332,7 @@ json_t* monitor_relations_to_server(const SERVER* server, const char* host);
|
||||
* @param monitor Monitor to journal
|
||||
* @param master The current master server or NULL if no master exists
|
||||
*/
|
||||
void store_server_journal(MXS_MONITOR *monitor, MXS_MONITOR_SERVERS *master);
|
||||
void store_server_journal(MXS_MONITOR *monitor, MXS_MONITORED_SERVER *master);
|
||||
|
||||
/**
|
||||
* @brief Load a journal of server states
|
||||
@ -340,6 +340,6 @@ void store_server_journal(MXS_MONITOR *monitor, MXS_MONITOR_SERVERS *master);
|
||||
* @param monitor Monitor where journal is loaded
|
||||
* @param master Set to point to the current master
|
||||
*/
|
||||
void load_server_journal(MXS_MONITOR *monitor, MXS_MONITOR_SERVERS **master);
|
||||
void load_server_journal(MXS_MONITOR *monitor, MXS_MONITORED_SERVER **master);
|
||||
|
||||
MXS_END_DECLS
|
||||
|
Reference in New Issue
Block a user