TSG-23844 请packet adapter提供健康状态查询的HTTP服务
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user