Moved common monitor structures and definitions to a separate header and added master down script to galeramon.
This commit is contained in:
@ -17,9 +17,9 @@
|
||||
*
|
||||
* Copyright MariaDB Corporation Ab 2013-2014
|
||||
*/
|
||||
#include <server.h>
|
||||
|
||||
#include <spinlock.h>
|
||||
#include <mysql.h>
|
||||
#include <monitor_common.h>
|
||||
#include <mon_exec.h>
|
||||
/**
|
||||
* @file mysqlmon.h - The MySQL monitor functionality within the gateway
|
||||
@ -37,24 +37,10 @@
|
||||
* 07/11/14 Massimiliano Pinto Addition of NetworkTimeout: connect, read, write
|
||||
* 20/04/15 Guillaume Lefranc Addition of availableWhenDonor
|
||||
* 22/04/15 Martin Brampton Addition of disableMasterRoleSetting
|
||||
*
|
||||
* 07/05/15 Markus Makela Addition of command execution on Master server failure
|
||||
* @endverbatim
|
||||
*/
|
||||
|
||||
/**
|
||||
* The linked list of servers that are being monitored by the MySQL
|
||||
* Monitor module.
|
||||
*/
|
||||
typedef struct monitor_servers {
|
||||
SERVER *server; /**< The server being monitored */
|
||||
MYSQL *con; /**< The MySQL connection */
|
||||
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 */
|
||||
} MONITOR_SERVERS;
|
||||
|
||||
/**
|
||||
* The handle for an instance of a MySQL Monitor module
|
||||
*/
|
||||
@ -84,12 +70,4 @@ typedef struct {
|
||||
EXTERNCMD* master_down_script;
|
||||
} MYSQL_MONITOR;
|
||||
|
||||
#define MONITOR_RUNNING 1
|
||||
#define MONITOR_STOPPING 2
|
||||
#define MONITOR_STOPPED 3
|
||||
|
||||
#define MONITOR_INTERVAL 10000 // in milliseconds
|
||||
#define MONITOR_DEFAULT_ID 1UL // unsigned long value
|
||||
#define MONITOR_MAX_NUM_SLAVES 20 //number of MySQL slave servers associated to a MySQL master server
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user