MXS-1220: Add session JSON output

Sessions can now be printed in JSON.
This commit is contained in:
Markus Mäkelä
2017-04-17 13:50:34 +03:00
committed by Markus Mäkelä
parent 13cba2cb75
commit fd680544d6
2 changed files with 56 additions and 0 deletions

View File

@ -25,6 +25,7 @@
#include <maxscale/log_manager.h>
#include <maxscale/resultset.h>
#include <maxscale/spinlock.h>
#include <maxscale/jansson.h>
MXS_BEGIN_DECLS
@ -412,4 +413,13 @@ bool session_take_stmt(MXS_SESSION *session, GWBUF **buffer, const struct server
*/
void session_clear_stmt(MXS_SESSION *session);
/**
* @brief Convert a session to JSON
*
* @param session Session to convert
*
* @return New JSON object or NULL on error
*/
json_t* session_to_json(const MXS_SESSION *session);
MXS_END_DECLS