52 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			52 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			C
		
	
	
	
	
	
| #ifndef _MYSQLMON_H
 | |
| #define _MYSQLMON_H
 | |
| /*
 | |
|  * Copyright (c) 2016 MariaDB Corporation Ab
 | |
|  *
 | |
|  * Use of this software is governed by the Business Source License included
 | |
|  * in the LICENSE.TXT file and at www.mariadb.com/bsl11.
 | |
|  *
 | |
|  * Change Date: 2020-01-01
 | |
|  *
 | |
|  * On the date above, in accordance with the Business Source License, use
 | |
|  * of this software will be governed by version 2 or later of the General
 | |
|  * Public License.
 | |
|  */
 | |
| 
 | |
| #include <stdio.h>
 | |
| #include <stdlib.h>
 | |
| #include <string.h>
 | |
| #include <monitor.h>
 | |
| #include <spinlock.h>
 | |
| #include <thread.h>
 | |
| #include <mysql.h>
 | |
| #include <mysqld_error.h>
 | |
| #include <log_manager.h>
 | |
| #include <secrets.h>
 | |
| #include <dcb.h>
 | |
| #include <modinfo.h>
 | |
| #include <config.h>
 | |
| #include <externcmd.h>
 | |
| 
 | |
| /**
 | |
|  * @file ndbclustermon.h - The NDB Cluster monitor
 | |
|  *
 | |
|  */
 | |
| 
 | |
| /**
 | |
|  * The handle for an instance of a NDB Cluster Monitor module
 | |
|  */
 | |
| typedef struct
 | |
| {
 | |
|     SPINLOCK lock; /**< The monitor spinlock */
 | |
|     pthread_t tid; /**< id of monitor thread */
 | |
|     int shutdown; /**< Flag to shutdown the monitor thread */
 | |
|     int status; /**< Monitor status */
 | |
|     unsigned long id; /**< Monitor ID */
 | |
|     MONITOR_SERVERS *master; /**< Master server for MySQL Master/Slave replication */
 | |
|     char* script; /*< Script to call when state changes occur on servers */
 | |
|     bool events[MAX_MONITOR_EVENT]; /*< enabled events */
 | |
| } MYSQL_MONITOR;
 | |
| 
 | |
| #endif
 | 
