MXS-1220: Implement /sessions/ resource

The /sessions/ resource was not implemented due to changes in the core
polling mechanics. With the new worker thread messaging system, sessions
can be listed in a safe manner.
This commit is contained in:
Markus Mäkelä
2017-04-22 08:47:42 +03:00
committed by Markus Mäkelä
parent cd6e0ab5e9
commit 690d592a94
3 changed files with 30 additions and 2 deletions

View File

@ -423,4 +423,13 @@ void session_clear_stmt(MXS_SESSION *session);
*/
json_t* session_to_json(const MXS_SESSION *session, const char* host);
/**
* @brief Convert all sessions to JSON
*
* @param host Hostname of this server
*
* @return A JSON array with all sessions
*/
json_t* session_list_to_json(const char* host);
MXS_END_DECLS