MXS-1929: Create router instance in service_alloc

By creating the router instance as a part of the service allocation
process, we are guaranteed that either the creation of the service is
completely successful or it fails. This should make runtime creation of
services easier.
This commit is contained in:
Markus Mäkelä
2018-07-17 15:41:53 +03:00
parent d8b539c85a
commit 36822da172
2 changed files with 49 additions and 20 deletions

View File

@ -37,6 +37,13 @@ MXS_BEGIN_DECLS
*/
SERVICE* service_alloc(const char *name, const char *router, MXS_CONFIG_PARAMETER* params);
/**
* Free a service
*
* @param service Service to free
*/
void service_free(SERVICE* service);
/**
* @brief Shut all services down
*