feature: add session monitor, support 'show session id/all/info' command

This commit is contained in:
luwenpeng
2024-11-07 19:12:51 +08:00
parent 50a841919d
commit d0a8685914
10 changed files with 1418 additions and 232 deletions

View File

@@ -598,10 +598,15 @@ void session_manager_on_thread_exit(struct module_manager *mod_mgr, int thread_i
session_manager_clean(sess_mgr, thread_id);
}
// temp add for show session command
struct session_manager_rte *session_manager_get_runtime(struct session_manager *sess_mgr, uint16_t thread_id)
struct session_manager_rte *session_manager_get_rte(struct session_manager *sess_mgr, uint16_t thread_id)
{
assert(sess_mgr);
assert(thread_id < sess_mgr->cfg->thread_num);
return sess_mgr->rte[thread_id];
}
struct session_manager_cfg *session_manager_get_cfg(struct session_manager *sess_mgr)
{
assert(sess_mgr);
return sess_mgr->cfg;
}