MXS-1220: Treat service listeners as service sub-resources
The listeners under the /services/:service/listeners collection are now fully JSON API compliant resources. The listeners could also be exposed as a /listeners collection to easily group all listener type resources in one place. This approach does has some semantical and practical problems, namely the fact that each listener has a many-to-one relationship with its service and listeners by themselves can't exist alone.
This commit is contained in:
@ -304,6 +304,16 @@ json_t* service_to_json(const SERVICE* service, const char* host);
|
||||
*/
|
||||
json_t* service_list_to_json(const char* host);
|
||||
|
||||
/**
|
||||
* @brief Convert service listeners to JSON
|
||||
*
|
||||
* @param service Service whose listeners are converted
|
||||
* @param host Hostname of this server
|
||||
*
|
||||
* @return Array of JSON format listeners
|
||||
*/
|
||||
json_t* service_listeners_to_json(const SERVICE* service, const char* host);
|
||||
|
||||
/**
|
||||
* @brief Get links to services that relate to a server
|
||||
*
|
||||
|
Reference in New Issue
Block a user