refact code
This commit is contained in:
parent
e063a8092c
commit
f2a3951c23
|
@ -25,9 +25,9 @@ extern "C" {
|
||||||
#include "tarray.h"
|
#include "tarray.h"
|
||||||
#include "thash.h"
|
#include "thash.h"
|
||||||
#include "tlog.h"
|
#include "tlog.h"
|
||||||
#include "tsimplehash.h"
|
|
||||||
#include "tmsg.h"
|
#include "tmsg.h"
|
||||||
#include "tmsgcb.h"
|
#include "tmsgcb.h"
|
||||||
|
#include "tsimplehash.h"
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
JOB_TASK_STATUS_NULL = 0,
|
JOB_TASK_STATUS_NULL = 0,
|
||||||
|
@ -119,7 +119,8 @@ typedef struct STableMeta {
|
||||||
int32_t sversion;
|
int32_t sversion;
|
||||||
int32_t tversion;
|
int32_t tversion;
|
||||||
STableComInfo tableInfo;
|
STableComInfo tableInfo;
|
||||||
SSchemaExt* schemaExt; // There is no additional memory allocation, and the pointer is fixed to the next address of the schema content.
|
SSchemaExt* schemaExt; // There is no additional memory allocation, and the pointer is fixed to the next address of
|
||||||
|
// the schema content.
|
||||||
SSchema schema[];
|
SSchema schema[];
|
||||||
} STableMeta;
|
} STableMeta;
|
||||||
#pragma pack(pop)
|
#pragma pack(pop)
|
||||||
|
@ -215,7 +216,6 @@ typedef struct STableBufInfo {
|
||||||
int64_t buffOffset;
|
int64_t buffOffset;
|
||||||
} STableBufInfo;
|
} STableBufInfo;
|
||||||
|
|
||||||
|
|
||||||
typedef struct STableDataCxt {
|
typedef struct STableDataCxt {
|
||||||
STableMeta* pMeta;
|
STableMeta* pMeta;
|
||||||
STSchema* pSchema;
|
STSchema* pSchema;
|
||||||
|
@ -253,7 +253,6 @@ typedef struct SStbInterlaceInfo {
|
||||||
int32_t pTableColsIdx;
|
int32_t pTableColsIdx;
|
||||||
} SStbInterlaceInfo;
|
} SStbInterlaceInfo;
|
||||||
|
|
||||||
|
|
||||||
typedef int32_t (*__async_send_cb_fn_t)(void* param, SDataBuf* pMsg, int32_t code);
|
typedef int32_t (*__async_send_cb_fn_t)(void* param, SDataBuf* pMsg, int32_t code);
|
||||||
typedef int32_t (*__async_exec_fn_t)(void* param);
|
typedef int32_t (*__async_exec_fn_t)(void* param);
|
||||||
|
|
||||||
|
@ -308,6 +307,8 @@ void destroyAhandle(void* ahandle);
|
||||||
int32_t asyncSendMsgToServerExt(void* pTransporter, SEpSet* epSet, int64_t* pTransporterId, SMsgSendInfo* pInfo,
|
int32_t asyncSendMsgToServerExt(void* pTransporter, SEpSet* epSet, int64_t* pTransporterId, SMsgSendInfo* pInfo,
|
||||||
bool persistHandle, void* ctx);
|
bool persistHandle, void* ctx);
|
||||||
|
|
||||||
|
int32_t asyncFreeConnById(void* pTransporter, int64_t pid);
|
||||||
|
;
|
||||||
/**
|
/**
|
||||||
* Asynchronously send message to server, after the response received, the callback will be incured.
|
* Asynchronously send message to server, after the response received, the callback will be incured.
|
||||||
*
|
*
|
||||||
|
|
|
@ -236,6 +236,9 @@ int32_t asyncSendMsgToServerExt(void* pTransporter, SEpSet* epSet, int64_t* pTra
|
||||||
int32_t asyncSendMsgToServer(void* pTransporter, SEpSet* epSet, int64_t* pTransporterId, SMsgSendInfo* pInfo) {
|
int32_t asyncSendMsgToServer(void* pTransporter, SEpSet* epSet, int64_t* pTransporterId, SMsgSendInfo* pInfo) {
|
||||||
return asyncSendMsgToServerExt(pTransporter, epSet, pTransporterId, pInfo, false, NULL);
|
return asyncSendMsgToServerExt(pTransporter, epSet, pTransporterId, pInfo, false, NULL);
|
||||||
}
|
}
|
||||||
|
int32_t asyncFreeConnById(void* pTransporter, int64_t pid) {
|
||||||
|
return rpcFreeConnById(pTransporter, pid);
|
||||||
|
}
|
||||||
|
|
||||||
char* jobTaskStatusStr(int32_t status) {
|
char* jobTaskStatusStr(int32_t status) {
|
||||||
switch (status) {
|
switch (status) {
|
||||||
|
|
Loading…
Reference in New Issue