2024-07-31 17:25:00 +08:00
|
|
|
/*************************************************************************
|
|
|
|
|
> File Name: lua_plugin_manage.h
|
2024-08-06 10:12:56 +08:00
|
|
|
> Author:
|
|
|
|
|
> Created Time: 2024-08
|
2024-07-31 17:25:00 +08:00
|
|
|
> Encoding : UTF-8
|
|
|
|
|
************************************************************************/
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
|
* version
|
|
|
|
|
* [ v0.1 ]
|
2024-08-06 10:12:56 +08:00
|
|
|
* 08-01
|
|
|
|
|
* 1. 修改外部暴露接口
|
|
|
|
|
* lua_plugin_manage_init
|
|
|
|
|
* lua_plugin_manage_exit
|
|
|
|
|
* 2. 声明数据结构
|
|
|
|
|
* struct lua_plugin_manage_schema
|
2024-08-19 14:53:42 +08:00
|
|
|
*
|
2024-08-15 17:39:28 +08:00
|
|
|
* 08-09
|
|
|
|
|
* 1. 修改参数函数原型, 传入参数修改为已经加载的配置信息
|
2024-07-31 17:25:00 +08:00
|
|
|
************************************************************************/
|
2024-08-06 10:12:56 +08:00
|
|
|
#pragma once
|
2024-07-31 17:25:00 +08:00
|
|
|
|
2024-08-16 11:50:23 +08:00
|
|
|
#include "stellar/stellar.h"
|
2024-07-31 17:25:00 +08:00
|
|
|
|
2024-08-13 17:22:10 +08:00
|
|
|
struct lua_config_specific
|
|
|
|
|
{
|
|
|
|
|
/* 插件需要使用的文件名 */
|
|
|
|
|
char *config_specific_file;
|
|
|
|
|
/* 加载插件需要调用的函数名称 */
|
|
|
|
|
char *config_specific_load_func;
|
|
|
|
|
/* 卸载插件需要调用的函数名称 */
|
|
|
|
|
char *config_specific_unload_func;
|
|
|
|
|
};
|
|
|
|
|
|
2024-08-06 10:12:56 +08:00
|
|
|
struct lua_plugin_manage_schema;
|
2024-07-31 17:25:00 +08:00
|
|
|
|
2024-08-19 14:53:42 +08:00
|
|
|
struct lua_plugin_manage_schema *lua_plugin_manage_init(struct stellar *st, int specific_count, struct lua_config_specific *specifics);
|
2024-08-19 18:38:22 +08:00
|
|
|
int lua_plugin_manage_load_one_specific(struct lua_plugin_manage_schema *schema, struct lua_config_specific *specific);
|
2024-08-29 18:20:10 +08:00
|
|
|
void lua_plugin_manage_exit(struct lua_plugin_manage_schema *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);
|