MXS-2363 Skeleton of /v1/maxscale/query_classifier/cache

URL routing in place, callback exists, but no actual information.
This commit is contained in:
Johan Wikman
2019-03-27 13:29:27 +02:00
parent 1a81371346
commit 9ec82932cf
6 changed files with 31 additions and 0 deletions

View File

@ -1504,3 +1504,15 @@ std::unique_ptr<json_t> qc_classify_as_json(const char* zHost, const std::string
return std::unique_ptr<json_t>(mxs_json_resource(zHost, MXS_JSON_API_QC_CLASSIFY, pSelf));
}
std::unique_ptr<json_t> qc_cache_as_json(const char* zHost)
{
json_t* pAttributes = json_object();
json_t* pSelf = json_object();
json_object_set_new(pSelf, CN_ID, json_string(CN_CACHE));
json_object_set_new(pSelf, CN_TYPE, json_string(CN_CACHE));
json_object_set_new(pSelf, CN_ATTRIBUTES, pAttributes);
return std::unique_ptr<json_t>(mxs_json_resource(zHost, MXS_JSON_API_QC_CACHE, pSelf));
}