Rename FILTER_DEF to MXS_FILTER_DEF
Provide functions that allows the actual definition of MXS_FILTER_DEF to be made private.
This commit is contained in:
@ -92,7 +92,7 @@ typedef struct mxs_filter_object
|
||||
* This is basically the link between a plugin to load and the
|
||||
* optons to pass to that plugin.
|
||||
*/
|
||||
typedef struct filter_def
|
||||
typedef struct mxs_filter_def
|
||||
{
|
||||
char *name; /**< The Filter name */
|
||||
char *module; /**< The module to load */
|
||||
@ -101,13 +101,37 @@ typedef struct filter_def
|
||||
MXS_FILTER* filter; /**< The runtime filter */
|
||||
MXS_FILTER_OBJECT *obj; /**< The "MODULE_OBJECT" for the filter */
|
||||
SPINLOCK spin; /**< Spinlock to protect the filter definition */
|
||||
struct filter_def *next; /**< Next filter in the chain of all filters */
|
||||
} FILTER_DEF;
|
||||
struct mxs_filter_def *next; /**< Next filter in the chain of all filters */
|
||||
} MXS_FILTER_DEF;
|
||||
|
||||
FILTER_DEF *filter_find(const char *);
|
||||
/**
|
||||
* Lookup a filter definition using the unique section name in
|
||||
* the configuration file.
|
||||
*
|
||||
* @param name The name of a filter.
|
||||
*
|
||||
* @return A filter definition or NULL if not found.
|
||||
*/
|
||||
MXS_FILTER_DEF *filter_def_find(const char *name);
|
||||
|
||||
/**
|
||||
* Get module name of a filter definition.
|
||||
*
|
||||
* @param filter_def A filter definition.
|
||||
*
|
||||
* @return The module name.
|
||||
*/
|
||||
const char* filter_def_get_module_name(const MXS_FILTER_DEF* filter_def);
|
||||
|
||||
/**
|
||||
* Get the filter instance of a particular filter definition.
|
||||
*
|
||||
* @return A filter instance.
|
||||
*/
|
||||
MXS_FILTER* filter_def_get_instance(const MXS_FILTER_DEF* filter_def);
|
||||
|
||||
void dprintAllFilters(DCB *);
|
||||
void dprintFilter(DCB *, const FILTER_DEF *);
|
||||
void dprintFilter(DCB *, const MXS_FILTER_DEF *);
|
||||
void dListFilters(DCB *);
|
||||
|
||||
/**
|
||||
|
@ -83,14 +83,14 @@ struct arg_node
|
||||
modulecmd_arg_type_t type;
|
||||
union
|
||||
{
|
||||
char *string;
|
||||
bool boolean;
|
||||
SERVICE *service;
|
||||
SERVER *server;
|
||||
SESSION *session;
|
||||
DCB *dcb;
|
||||
MONITOR *monitor;
|
||||
FILTER_DEF *filter;
|
||||
char *string;
|
||||
bool boolean;
|
||||
SERVICE *service;
|
||||
SERVER *server;
|
||||
SESSION *session;
|
||||
DCB *dcb;
|
||||
MONITOR *monitor;
|
||||
MXS_FILTER_DEF *filter;
|
||||
} value;
|
||||
};
|
||||
|
||||
|
@ -163,7 +163,7 @@ typedef struct service
|
||||
* when querying them from the server. MySQL Workbench seems
|
||||
* to escape at least the underscore character. */
|
||||
SERVICE_REFRESH_RATE rate_limit; /**< The refresh rate limit for users table */
|
||||
FILTER_DEF **filters; /**< Ordered list of filters */
|
||||
MXS_FILTER_DEF **filters; /**< Ordered list of filters */
|
||||
int n_filters; /**< Number of filters */
|
||||
long conn_idle_timeout; /**< Session timeout in seconds */
|
||||
char *weightby; /**< Service weighting parameter name */
|
||||
|
@ -45,7 +45,7 @@ MXS_BEGIN_DECLS
|
||||
|
||||
struct dcb;
|
||||
struct service;
|
||||
struct filter_def;
|
||||
struct mxs_filter_def;
|
||||
struct server;
|
||||
|
||||
/**
|
||||
@ -132,7 +132,7 @@ typedef struct mxs_upstream
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
struct filter_def *filter;
|
||||
struct mxs_filter_def *filter;
|
||||
void *instance;
|
||||
void *session;
|
||||
} SESSION_FILTER;
|
||||
|
Reference in New Issue
Block a user