diff options
| author | yangwei <[email protected]> | 2024-11-25 19:23:01 +0800 |
|---|---|---|
| committer | yangwei <[email protected]> | 2024-11-25 19:23:01 +0800 |
| commit | 73a8402a092564b76659a22acfd5e9bbb8146172 (patch) | |
| tree | 014d42332014532bef4734d20d62c63a2616f73f /include | |
| parent | ef5a65155b11fec8c6234f0a18678e11d7f79cf1 (diff) | |
🦄 refactor(module manager): rename polling API
Diffstat (limited to 'include')
| -rw-r--r-- | include/stellar/module.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/include/stellar/module.h b/include/stellar/module.h index 0f43a4c..db15bf0 100644 --- a/include/stellar/module.h +++ b/include/stellar/module.h @@ -44,6 +44,8 @@ struct module_hooks }; struct module_manager *module_manager_new(struct module_hooks mod_specs[], size_t n_mod, int max_thread_num, const char *toml_path, struct mq_schema *mq_schema, struct logger *logger); +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_free(struct module_manager *mod_mgr); void module_manager_register_thread(struct module_manager *mod_mgr, int thread_id, struct mq_runtime *mq_rt); @@ -64,9 +66,9 @@ struct logger *module_manager_get_logger(struct module_manager *mod_mgr); * polling API * *******************************************/ -typedef void module_on_polling_func(struct module_manager *mod_mgr, void *polling_arg); -int module_manager_polling_subscribe(struct module_manager *mod_mgr, module_on_polling_func on_polling, void *polling_arg); -void module_manager_polling_active(struct module_manager *mod_mgr); +typedef void on_polling_callback(struct module_manager *mod_mgr, void *polling_arg); +int module_manager_register_polling_node(struct module_manager *mod_mgr, on_polling_callback *on_polling, void *polling_arg); +void module_manager_polling_dispatch(struct module_manager *mod_mgr); #ifdef __cplusplus } |
