【修改】重新梳理数据结构并重构部分逻辑
This commit is contained in:
@@ -1,43 +1,17 @@
|
||||
/*************************************************************************
|
||||
> File Name: lua_plugin_manage.h
|
||||
> Author:
|
||||
> Created Time: 2024-08
|
||||
> Encoding : UTF-8
|
||||
************************************************************************/
|
||||
|
||||
/*************************************************************************
|
||||
* version
|
||||
* [ v0.1 ]
|
||||
* 08-01
|
||||
* 1. 修改外部暴露接口
|
||||
* lua_plugin_manage_init
|
||||
* lua_plugin_manage_exit
|
||||
* 2. 声明数据结构
|
||||
* struct lua_plugin_manage_schema
|
||||
*
|
||||
* 08-09
|
||||
* 1. 修改参数函数原型, 传入参数修改为已经加载的配置信息
|
||||
************************************************************************/
|
||||
#pragma once
|
||||
|
||||
#include "stellar/stellar.h"
|
||||
|
||||
struct lua_config_specific
|
||||
struct lua_config_spec
|
||||
{
|
||||
/* 插件需要使用的文件名 */
|
||||
char *config_specific_file;
|
||||
/* 加载插件需要调用的函数名称 */
|
||||
char *config_specific_load_func;
|
||||
/* 卸载插件需要调用的函数名称 */
|
||||
char *config_specific_unload_func;
|
||||
char *spec_file_path; /* 插件需要使用的文件名 */
|
||||
char *spec_load_func_name; /* 加载插件需要调用的函数名称 */
|
||||
char *spec_unload_func_name; /* 卸载插件需要调用的函数名称 */
|
||||
};
|
||||
|
||||
struct lua_plugin_manage_schema;
|
||||
struct lua_plugin_manage;
|
||||
|
||||
struct lua_plugin_manage_schema *lua_plugin_manage_init(struct stellar *st, int specific_count, struct lua_config_specific *specifics);
|
||||
int lua_plugin_manage_load_one_specific(struct lua_plugin_manage_schema *schema, struct lua_config_specific *specific);
|
||||
void lua_plugin_manage_exit(struct lua_plugin_manage_schema *lua_plug_mgr);
|
||||
struct lua_plugin_manage *lua_plugin_manage_init(struct stellar *st, struct lua_config_spec specifics[], size_t specific_num);
|
||||
void lua_plugin_manage_exit(struct lua_plugin_manage *lua_plug_mgr);
|
||||
|
||||
void lua_plugin_get_statistics(int plugin_id, int thread_id, int *new_success, int *new_fail, int *free_success, int *free_fail);
|
||||
|
||||
void debug_lua_plugin_manage_schema(struct lua_plugin_manage_schema *schema);
|
||||
// void debug_lua_plugin_manage_schema(struct lua_plugin_manage *schema);
|
||||
Reference in New Issue
Block a user