MXS-1848 Move Worker from internal to public include dir

maxscale::Worker needs to be public if monitors should be
implementable using it.
This commit is contained in:
Johan Wikman 2018-05-08 15:49:58 +03:00
parent 370b3be576
commit 42c10cfa1c
16 changed files with 36 additions and 33 deletions

View File

@ -23,6 +23,31 @@
MXS_BEGIN_DECLS
/**
* A statistic identifier that can be returned by poll_get_stat
*/
typedef enum
{
POLL_STAT_READ,
POLL_STAT_WRITE,
POLL_STAT_ERROR,
POLL_STAT_HANGUP,
POLL_STAT_ACCEPT,
POLL_STAT_EVQ_LEN,
POLL_STAT_EVQ_MAX,
POLL_STAT_MAX_QTIME,
POLL_STAT_MAX_EXECTIME
} POLL_STAT;
/*
* Return a particular statistics value.
*
* @param stat What to return.
*
* @return The value.
*/
int64_t poll_get_stat(POLL_STAT stat);
/*
* Insert a fake hangup event for a DCB into the polling queue.
*

View File

@ -19,11 +19,9 @@
#include <maxscale/platform.h>
#include <maxscale/session.h>
#include <maxscale/utils.hh>
#include <maxscale/worker.h>
#include "messagequeue.hh"
#include "poll.h"
#include "worker.h"
#include "workertask.hh"
#include "session.hh"
#include <maxscale/workertask.hh>
namespace maxscale
{

View File

@ -55,11 +55,11 @@
#include <maxscale/spinlock.h>
#include <maxscale/utils.h>
#include <maxscale/semaphore.hh>
#include <maxscale/workertask.hh>
#include "internal/modules.h"
#include "internal/routingworker.hh"
#include "internal/session.h"
#include "internal/workertask.hh"
using maxscale::RoutingWorker;
using maxscale::Worker;

View File

@ -43,6 +43,7 @@
#include <maxscale/housekeeper.h>
#include <maxscale/log_manager.h>
#include <maxscale/maxscale.h>
#include <maxscale/messagequeue.hh>
#include <maxscale/mysql_utils.h>
#include <maxscale/paths.h>
#include <maxscale/query_classifier.h>
@ -56,7 +57,6 @@
#include "internal/admin.hh"
#include "internal/config.h"
#include "internal/maxscale.h"
#include "internal/messagequeue.hh"
#include "internal/modules.h"
#include "internal/monitor.h"
#include "internal/poll.h"

View File

@ -26,22 +26,6 @@ struct mxs_worker;
#define MAX_EVENTS 1000
/**
* A statistic identifier that can be returned by poll_get_stat
*/
typedef enum
{
POLL_STAT_READ,
POLL_STAT_WRITE,
POLL_STAT_ERROR,
POLL_STAT_HANGUP,
POLL_STAT_ACCEPT,
POLL_STAT_EVQ_LEN,
POLL_STAT_EVQ_MAX,
POLL_STAT_MAX_QTIME,
POLL_STAT_MAX_EXECTIME
} POLL_STAT;
enum poll_message
{
POLL_MSG_CLEAN_PERSISTENT = 0x01
@ -58,7 +42,6 @@ void dShowThreads(DCB *dcb);
void dShowEventQ(DCB *dcb);
void dShowEventStats(DCB *dcb);
int64_t poll_get_stat(POLL_STAT stat);
RESULTSET *eventTimesGetList();
MXS_END_DECLS

View File

@ -14,7 +14,7 @@
#include <maxscale/cppdefs.hh>
#include <maxscale/routingworker.h>
#include "worker.hh"
#include <maxscale/worker.hh>
#include "session.hh"
namespace maxscale

View File

@ -11,7 +11,7 @@
* Public License.
*/
#include "internal/messagequeue.hh"
#include <maxscale/messagequeue.hh>
#include <errno.h>
#include <fcntl.h>
#include <string.h>

View File

@ -36,7 +36,6 @@
#include "internal/poll.h"
#include "internal/service.h"
#include "internal/statistics.h"
#include "internal/workertask.hh"
#define WORKER_ABSENT_ID -1

View File

@ -43,7 +43,6 @@
#include "internal/monitor.h"
#include "internal/poll.h"
#include "internal/workertask.hh"
#include "internal/routingworker.hh"
using maxscale::Semaphore;

View File

@ -44,7 +44,6 @@
#include "internal/filter.h"
#include "internal/routingworker.hh"
#include "internal/session.h"
#include "internal/workertask.hh"
using std::string;
using std::stringstream;

View File

@ -36,8 +36,8 @@
#include <maxscale/config.h>
#include <maxscale/listener.h>
#include <maxscale/messagequeue.hh>
#include "../internal/messagequeue.hh"
#include "../internal/routingworker.hh"
#include "../dcb.cc"
#include "test_utils.h"

View File

@ -12,7 +12,8 @@
*/
#include <iostream>
#include "../internal/worker.hh"
#include <maxscale/worker.hh>
#include "../internal/poll.h"
using namespace std;

View File

@ -11,7 +11,7 @@
* Public License.
*/
#include "internal/worker.hh"
#include <maxscale/worker.hh>
#include <errno.h>
#include <fcntl.h>
@ -38,7 +38,6 @@
#include "internal/poll.h"
#include "internal/service.h"
#include "internal/statistics.h"
#include "internal/workertask.hh"
#define WORKER_ABSENT_ID -1

View File

@ -11,7 +11,7 @@
* Public License.
*/
#include "internal/workertask.hh"
#include <maxscale/workertask.hh>
#include <maxscale/atomic.h>
#include <maxscale/debug.h>