MXS-1220: Make individual listeners resources

The listeners are now a proper sub-resource of the service resource. This
means that it acts like a normal resource and can be queried both as a
collection of resources and as an individual resource.
This commit is contained in:
Markus Mäkelä
2017-07-22 02:26:38 +03:00
parent e76dc80e47
commit 090de1a0f7
4 changed files with 73 additions and 8 deletions

View File

@ -322,7 +322,18 @@ json_t* service_list_to_json(const char* host);
*
* @return Array of JSON format listeners
*/
json_t* service_listeners_to_json(const SERVICE* service, const char* host);
json_t* service_listener_list_to_json(const SERVICE* service, const char* host);
/**
* @brief Convert service listener to JSON
*
* @param service Service whose listener is converted
* @param name The name of the listener
* @param host Hostname of this server
*
* @return JSON format listener
*/
json_t* service_listener_to_json(const SERVICE* service, const char* name, const char* host);
/**
* @brief Get links to services that relate to a server