More cleanup of monitor.h

Move some more functions into core header + miscellaneous cleanup
This commit is contained in:
Esa Korhonen
2017-01-19 12:38:31 +02:00
parent 02a8f7492e
commit 53c5b475ad
7 changed files with 41 additions and 29 deletions

View File

@ -41,9 +41,19 @@ typedef enum
extern MXS_MONITOR *monitor_alloc(char *, char *);
extern void monitor_free(MXS_MONITOR *);
void monitorStart(MXS_MONITOR *, void*);
void monitorStop(MXS_MONITOR *);
extern void monitorStopAll();
extern void monitorStartAll();
MXS_MONITOR *monitor_find(const char *);
void monitorShow(DCB *, MXS_MONITOR *);
void monitorShowAll(DCB *);
void monitorList(DCB *);
RESULTSET *monitorGetList();
extern bool monitorAddServer(MXS_MONITOR *mon, SERVER *server);
extern void monitorRemoveServer(MXS_MONITOR *mon, SERVER *server);
extern void monitorAddUser(MXS_MONITOR *, char *, char *);

View File

@ -12,12 +12,15 @@
*/
#include <maxscale/modulecmd.h>
#include <maxscale/alloc.h>
#include <maxscale/config.h>
#include <maxscale/pcre2.h>
#include <maxscale/platform.h>
#include <maxscale/spinlock.h>
#include "maxscale/filter.h"
#include "maxscale/monitor.h"
/** Size of the error buffer */
#define MODULECMD_ERRBUF_SIZE 512

View File

@ -27,22 +27,25 @@
*
* @endverbatim
*/
#include <maxscale/monitor.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <maxscale/spinlock.h>
#include <maxscale/modules.h>
#include <maxscale/log_manager.h>
#include <maxscale/secrets.h>
#include <maxscale/pcre2.h>
#include <maxscale/externcmd.h>
#include <mysqld_error.h>
#include <maxscale/mysql_utils.h>
#include <maxscale/alloc.h>
#include <maxscale/gwdirs.h>
#include "maxscale/monitor.h"
#include <maxscale/alloc.h>
#include <mysqld_error.h>
#include <maxscale/externcmd.h>
#include <maxscale/gwdirs.h>
#include <maxscale/log_manager.h>
#include <maxscale/modules.h>
#include <maxscale/mysql_utils.h>
#include <maxscale/pcre2.h>
#include <maxscale/secrets.h>
#include <maxscale/spinlock.h>
#include "maxscale/config.h"
#include "maxscale/monitor.h"
static MXS_MONITOR *allMonitors = NULL;
static SPINLOCK monLock = SPINLOCK_INIT;