MXS-1220: Add old router diagnostic interface

Added back the old diagnostic entry point to the router interface.
This commit is contained in:
Markus Mäkelä
2017-04-21 12:15:06 +03:00
committed by Markus Mäkelä
parent b1294f083c
commit fc887c7f5f
11 changed files with 769 additions and 18 deletions

View File

@ -48,7 +48,8 @@ static MXS_ROUTER_SESSION *newSession(MXS_ROUTER *instance, MXS_SESSION *sessio
static void closeSession(MXS_ROUTER *instance, MXS_ROUTER_SESSION *router_session);
static void freeSession(MXS_ROUTER *instance, MXS_ROUTER_SESSION *router_session);
static int execute(MXS_ROUTER *instance, MXS_ROUTER_SESSION *router_session, GWBUF *queue);
static json_t* diagnostics(const MXS_ROUTER *instance);
static void diagnostics(MXS_ROUTER *instance, DCB *dcb);
static json_t* diagnostics_json(const MXS_ROUTER *instance);
static uint64_t getCapabilities(MXS_ROUTER* instance);
extern int execute_cmd(CLI_SESSION *cli);
@ -78,6 +79,7 @@ MXS_MODULE* MXS_CREATE_MODULE()
freeSession,
execute,
diagnostics,
diagnostics_json,
NULL,
NULL,
getCapabilities,
@ -284,7 +286,13 @@ execute(MXS_ROUTER *instance, MXS_ROUTER_SESSION *router_session, GWBUF *queue)
* @param instance Instance of the router
* @param dcb DCB to send diagnostics to
*/
static json_t* diagnostics(const MXS_ROUTER *instance)
static void
diagnostics(MXS_ROUTER *instance, DCB *dcb)
{
return; /* Nothing to do currently */
}
static json_t* diagnostics_json(const MXS_ROUTER *instance)
{
return NULL;
}