提交 775da462 编写于 作者: L Liu Jicong

add tq files, fix cmake file

上级 82523908
......@@ -17,6 +17,7 @@
#define _TD_TQ_H_
#include "os.h"
#include "tutil.h"
#ifdef __cplusplus
extern "C" {
......@@ -79,14 +80,14 @@ typedef struct TmqConsumeRsp {
typedef struct TmqSubscribeReq {
TmqMsgHead head;
int64_t topicLen;
char topic[];
int32_t topicNum;
int64_t topic[];
} TmqSubscribeReq;
typedef struct tmqSubscribeRsp {
TmqMsgHead head;
int64_t vgId;
char ep[]; //TSDB_EP_LEN
char ep[TSDB_EP_LEN]; //TSDB_EP_LEN
} TmqSubscribeRsp;
typedef struct TmqHeartbeatReq {
......@@ -98,17 +99,17 @@ typedef struct TmqHeartbeatRsp {
} TmqHeartbeatRsp;
typedef struct TqTopicVhandle {
//name
//
int64_t topicId;
//executor for filter
//
void* filterExec;
//callback for mnode
//
//trigger when vnode list associated topic change
void* (*mCallback)(void*, void*);
} TqTopicVhandle;
typedef struct STQ {
//the collection of group handle
//the handle of kvstore
} STQ;
#define TQ_BUFFER_SIZE 8
......
......@@ -4,9 +4,9 @@ target_include_directories(
wal
PUBLIC "${CMAKE_SOURCE_DIR}/include/libs/wal"
PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/inc"
PRIVATE "${CMAKE_SOURCE_DIR}/include/os"
)
target_link_libraries(
os
wal
PUBLIC os
)
......@@ -64,6 +64,7 @@ SMeta *metaOpen(SMetaOpts *pMetaOpts) {
// TODO: need to figure out how to persist the START UID
tableUidGeneratorInit(&(pMeta->uidGenerator), IVLD_TB_UID);
return pMeta;
}
void metaClose(SMeta *pMeta) {
......
......@@ -3,11 +3,12 @@ add_library(tq ${TQ_SRC})
target_include_directories(
tq
PUBLIC "${CMAKE_SOURCE_DIR}/include/server/vnode/tq"
PUBLIC "${CMAKE_SOURCE_DIR}/include/libs/wal"
PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/inc"
PRIVATE "${CMAKE_SOURCE_DIR}/include/os"
)
target_link_libraries(
wal
tq
PUBLIC wal
PUBLIC os
PUBLIC util
)
/*
* Copyright (c) 2019 TAOS Data, Inc. <jhtao@taosdata.com>
*
* This program is free software: you can use, redistribute, and/or modify
* it under the terms of the GNU Affero General Public License, version 3
* or later ("AGPL"), as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
......@@ -18,7 +18,6 @@
#include "tq.h"
#ifdef __cplusplus
extern "C" {
#endif
......
/*
* Copyright (c) 2019 TAOS Data, Inc. <jhtao@taosdata.com>
*
* This program is free software: you can use, redistribute, and/or modify
* it under the terms of the GNU Affero General Public License, version 3
* or later ("AGPL"), as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _TQ_META_STORE_H_
#define _TQ_META_STORE_H_
#include "os.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef struct TqKvHandle {
int64_t key;
int64_t offset;
void *valueInUse;
void *valueInTxn;
//serializer
} TqKvHandle;
#ifdef __cplusplus
}
#endif
#endif /* ifndef _TQ_META_STORE_H_ */
/*
* Copyright (c) 2019 TAOS Data, Inc. <jhtao@taosdata.com>
*
* This program is free software: you can use, redistribute, and/or modify
* it under the terms of the GNU Affero General Public License, version 3
* or later ("AGPL"), as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/*
* Copyright (c) 2019 TAOS Data, Inc. <jhtao@taosdata.com>
*
* This program is free software: you can use, redistribute, and/or modify
* it under the terms of the GNU Affero General Public License, version 3
* or later ("AGPL"), as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册