This repository has been archived on 2025-09-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
stellar-stellar/infra/module_manager/module_manager_interna.h

47 lines
1.1 KiB
C
Raw Normal View History

#pragma once
#ifdef __cplusplus
extern "C"
{
#endif
#include "stellar/module_manager.h"
#include "uthash/utarray.h"
#include "stellar/mq.h"
#include <limits.h>
struct stellar_module
{
char name[NAME_MAX];
void *module_ctx;
};
struct stellar_module_manager
{
char *module_spec_toml_path;
struct
{
UT_array *module_specs_array;
int max_thread_num;
struct mq_schema *mq_schema;
}schema;
}__attribute__((aligned(sizeof(void*))));
struct module_specific
{
struct stellar_module *mod;
module_on_init_func *on_init_cb;
module_on_exit_func *on_exit_cb;
}__attribute__((aligned(sizeof(void*))));
#include "toml/toml.h"
toml_table_t *toml_parse_file_path(const char *toml_conf_path) __attribute__((visibility("hidden")));
struct module_specific *module_specs_load(toml_table_t* conf, int *mod_num) __attribute__((visibility("hidden")));
struct stellar_module_manager *stellar_module_manager_new_with_toml(toml_table_t *conf, int max_thread_num, struct mq_schema *mq_schema) __attribute__((visibility("hidden")));
#ifdef __cplusplus
}
#endif