#pragma once #ifdef __cplusplus extern "C" { #endif #include "stellar/module.h" #include "stellar/mq.h" #include #include struct module { char name[NAME_MAX]; void *ctx; }; struct module_descriptor { struct module_hooks hooks; struct module *mod; bool initialized; }__attribute__((aligned(sizeof(void*)))); struct module_manager { struct module_descriptor *descriptors; int n_descriptor; int topic_polling_id; struct { char *toml_path; int max_thread_num; struct mq_schema *mq_schema; struct logger *logger; }config; }__attribute__((aligned(sizeof(void*)))); struct module_manager *module_manager_new_with_toml(const char *toml_path, int max_thread_num, struct mq_schema *mq_schema, struct logger *logger); void module_manager_polling_dispatch(struct module_manager *mod_mgr); #ifdef __cplusplus } #endif