🦄 refactor(module manager): rename polling API

This commit is contained in:
yangwei
2024-11-25 19:23:01 +08:00
parent ef5a65155b
commit 73a8402a09
7 changed files with 33 additions and 46 deletions

View File

@@ -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
}