#pragma once #ifdef __cplusplus extern "C" { #endif #include "stellar/module_manager.h" #include "stellar/mq.h" #include #include struct stellar_module { char name[NAME_MAX]; void *module_ctx; }; struct module_spec_load { struct stellar_module *mod; module_on_instance_init_func *on_instance_init_cb; module_on_instance_exit_func *on_instance_exit_cb; module_on_thread_init_func *on_thread_init_cb; module_on_thread_exit_func *on_thread_exit_cb; char *path; char *instance_init_cb_name; char *instance_exit_cb_name; char *thread_init_cb_name; char *thread_exit_cb_name; bool init_succ; }__attribute__((aligned(sizeof(void*)))); struct stellar_module_manager { char *module_spec_toml_path; struct module_spec_load *module_specs; int load_module_num; int topic_polling_id; struct { int max_thread_num; struct mq_schema *mq_schema; struct logger *logger; }schema; }__attribute__((aligned(sizeof(void*)))); void stellar_polling_dispatch(struct stellar_module_manager *mod_mgr); #ifdef __cplusplus } #endif