✨ feat(deps/utable): define kv in utable.h temporary
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include <stdlib.h>
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
@@ -8,6 +9,10 @@ extern "C"
|
||||
#include "stellar/mq.h"
|
||||
#include "stellar/log.h"
|
||||
|
||||
/*******************************************
|
||||
* module API *
|
||||
*******************************************/
|
||||
|
||||
struct module;
|
||||
struct module *module_new(const char *name, void *ctx);
|
||||
void module_free(struct module *mod);
|
||||
@@ -18,6 +23,10 @@ void module_set_ctx(struct module *mod, void *ctx);
|
||||
const char *module_get_name(struct module* mod);
|
||||
void module_set_name(struct module* mod, const char *name);
|
||||
|
||||
/*******************************************
|
||||
* module API *
|
||||
*******************************************/
|
||||
|
||||
struct module_manager;
|
||||
|
||||
typedef struct module *module_on_instance_init_func(struct module_manager *mod_mgr);
|
||||
@@ -26,7 +35,15 @@ typedef void module_on_instance_exit_func(struct module_manager *mod_mgr, struct
|
||||
typedef struct module *module_on_thread_init_func(struct module_manager *mod_mgr, int thread_id, struct module *mod);
|
||||
typedef void module_on_thread_exit_func(struct module_manager *mod_mgr, int thread_id, struct module *mod);
|
||||
|
||||
struct module_manager *module_manager_new(const char *module_spec_toml_path, int max_thread_num, struct mq_schema *mq_schema, struct logger *logger);
|
||||
struct module_specification
|
||||
{
|
||||
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;
|
||||
};
|
||||
|
||||
struct module_manager *module_manager_new(struct module_specification mod_specs[], size_t n_mod, 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);
|
||||
|
||||
Reference in New Issue
Block a user