MXS-1220: Implement JSON diagnostics for most routers

All routers except the binlogrouter now fully implement the JSON
diagnostic entry point. The binlogrouter needs to be handled in a separate
commit as it produces a large amount of diagnostic output.
This commit is contained in:
Markus Mäkelä
2017-04-18 10:48:22 +03:00
committed by Markus Mäkelä
parent 25c8fb8556
commit eb3ff1cc7b
14 changed files with 127 additions and 161 deletions

View File

@ -173,11 +173,15 @@ public:
return rv;
}
static void diagnostics(MXS_ROUTER* pInstance, DCB* pDcb)
static json_t* diagnostics(MXS_ROUTER* pInstance)
{
RouterType* pRouter = static_cast<RouterType*>(pInstance);
MXS_EXCEPTION_GUARD(pRouter->diagnostics(pDcb));
json_t* rval = NULL;
MXS_EXCEPTION_GUARD(rval = pRouter->diagnostics());
return rval;
}
static void clientReply(MXS_ROUTER*, MXS_ROUTER_SESSION* pData, GWBUF* pPacket, DCB* pBackend)