MXS-1220: Add session JSON output
Sessions can now be printed in JSON.
This commit is contained in:

committed by
Markus Mäkelä

parent
13cba2cb75
commit
fd680544d6
@ -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
|
||||
|
Reference in New Issue
Block a user