MXS-1929: Make services destroyable
Services can now be destroyed if they have no active listeners and they are not linked to servers. When these conditions are met, the service will be destroyed when the last session for the service is closed. The closing of a service will close all listeners that were once assigned to the service. This allows closing of the ports at runtime which previously was done only on shutdown. Exposed the command through the REST API but not through MaxAdmin as it is deprecated.
This commit is contained in:
@ -216,6 +216,17 @@ bool runtime_create_filter(const char *name, const char *module, MXS_CONFIG_PARA
|
||||
*/
|
||||
bool runtime_destroy_monitor(MXS_MONITOR *monitor);
|
||||
|
||||
/**
|
||||
* Destroy a service
|
||||
*
|
||||
* The service can only be destroyed if it uses no servers and has no active listeners.
|
||||
*
|
||||
* @param service Service to destroy
|
||||
*
|
||||
* @return True if service was destroyed
|
||||
*/
|
||||
bool runtime_destroy_service(SERVICE* service);
|
||||
|
||||
/**
|
||||
* @brief Create a new server from JSON
|
||||
*
|
||||
|
Reference in New Issue
Block a user