MXS-1929: Add runtime creation of filters

Filters can now be created at runtime. This is not yet a usable feature
since the filters can't be added to services at runtime.
This commit is contained in:
Markus Mäkelä
2018-07-17 09:49:34 +03:00
parent d6c378187c
commit 2c1f79c5d1
5 changed files with 239 additions and 15 deletions

View File

@ -194,6 +194,17 @@ bool runtime_destroy_listener(SERVICE *service, const char *name);
*/
bool runtime_create_monitor(const char *name, const char *module);
/**
* @brief Create a new filter
*
* @param name Name of the filter
* @param module Filter module
* @param params Filter parameters
*
* @return True if a new filter was created and persisted
*/
bool runtime_create_filter(const char *name, const char *module, MXS_CONFIG_PARAMETER* params);
/**
* @brief Destroy a monitor
*
@ -244,6 +255,15 @@ bool runtime_alter_server_relationships_from_json(SERVER* server, const char* ty
*/
MXS_MONITOR* runtime_create_monitor_from_json(json_t* json);
/**
* @brief Create a new filter from JSON
*
* @param json JSON defining the filter
*
* @return Created filter or NULL on error
*/
MXS_FILTER_DEF* runtime_create_filter_from_json(json_t* json);
/**
* @brief Alter a monitor using JSON
*