feat(infra/exdata): exdata as independent component

This commit is contained in:
yangwei
2024-09-06 18:36:24 +08:00
parent 3de8bbdabc
commit a24214cbee
12 changed files with 270 additions and 177 deletions

View File

@@ -9,20 +9,16 @@ extern "C"
#include "stellar/stellar.h"
#include "stellar/stellar_mq.h"
#include "stellar/stellar_exdata.h"
#include "uthash/utarray.h"
#include "exdata/exdata.h"
struct stellar_message;
struct per_thread_exdata_array
{
struct stellar_exdata *exdata_array;
};
struct plugin_manager_per_thread_data
{
struct per_thread_exdata_array per_thread_pkt_exdata_array;
struct exdata_handle *exdata_array;
struct stellar_message *priority_mq[STELLAR_MQ_PRIORITY_MAX];// message list
struct stellar_message *dealth_letter_queue;// dlq list
unsigned long long pub_packet_msg_cnt;
@@ -32,7 +28,7 @@ struct plugin_manager_schema
{
struct stellar *st;
UT_array *plugin_load_specs_array;
UT_array *stellar_exdata_schema_array;
struct exdata_schema *exdata_schema;
UT_array *stellar_mq_schema_array;
UT_array *registered_packet_plugin_array;
UT_array *registered_polling_plugin_array;
@@ -43,26 +39,6 @@ struct plugin_manager_schema
}__attribute__((aligned(sizeof(void*))));
enum plugin_exdata_state
{ INIT, ACTIVE, EXIT };
struct stellar_exdata
{
struct plugin_manager_schema *plug_mgr;
void *exdata;
enum plugin_exdata_state state;
};
struct stellar_exdata_schema
{
char *name;
stellar_exdata_free *free_func;
void *free_arg;
int idx;
}__attribute__((aligned(sizeof(void*))));
struct stellar_message
{
struct stellar *st;