feat(plugin manager): integrated plugin manager, build success

This commit is contained in:
yangwei
2024-05-17 16:55:46 +08:00
committed by luwenpeng
parent db611561f6
commit e0ec3f2d52
17 changed files with 1201 additions and 62 deletions

View File

@@ -76,6 +76,7 @@ static int all_stat_have_output(void)
int main(int argc, char **argv)
{
struct stellar st = {runtime};
stellar_update_time_cache();
signal(SIGINT, signal_handler);
@@ -110,8 +111,7 @@ int main(int argc, char **argv)
STELLAR_LOG_ERROR("unable to create stellar stat");
goto error_out;
}
runtime->plug_mgr = plugin_manager_new();
runtime->plug_mgr = plugin_manager_init(&st, "./stellar_plugin/spec.toml");
if (runtime->plug_mgr == NULL)
{
STELLAR_LOG_ERROR("unable to create plugin manager");
@@ -160,7 +160,7 @@ error_out:
stellar_thread_join(runtime, config);
stellar_thread_clean(runtime, config);
packet_io_free(runtime->packet_io);
plugin_manager_free(runtime->plug_mgr);
plugin_manager_exit(runtime->plug_mgr);
stellar_stat_free(runtime->stat);
STELLAR_LOG_STATE("stellar exit !!!\n");
log_free();