TSG-23844 请packet adapter提供健康状态查询的HTTP服务

This commit is contained in:
luwenpeng
2024-11-20 14:41:30 +08:00
parent 1942f792e7
commit a51344bba3
7 changed files with 120 additions and 1 deletions

View File

@@ -10,6 +10,7 @@
#include "packet_io.h"
#include "packet_stat.h"
#include "packet_handle.h"
#include "http_healthcheck.h"
#define LOG_MAIN "PacketAdapter"
@@ -225,6 +226,8 @@ int main(int argc, char **argv)
}
}
http_healthcheck_server_start(profile);
while (!runtime->need_stop)
{
packet_stat_flush(runtime->stat, &runtime->metrics);
@@ -232,6 +235,7 @@ int main(int argc, char **argv)
}
error:
http_healthcheck_server_stop();
packet_stat_destory(runtime->stat);
packet_io_destory(runtime->handle);
LOG_CLOSE();