This commit is contained in:
Hongze Cheng 2021-09-26 10:44:50 +08:00
parent 3908cbd341
commit 3347de549f
3 changed files with 22 additions and 2 deletions

View File

@ -24,16 +24,32 @@ extern "C" {
typedef struct STsdb STsdb;
typedef struct {
int32_t id; // TODO: use a global definition
int32_t days;
int32_t keep;
int32_t keep1;
int32_t keep2;
int32_t minRows;
int32_t maxRows;
int8_t precision;
int8_t update;
} STsdbCfg;
int tsdbInit(int nthreads);
int tsdbClear();
// Module init and clear
int tsdbInit();
int tsdbClear();
// Repository operations
int tsdbCreateRepo(int id);
int tsdbDropRepo(int id);
STsdb *tsdbOpenRepo(STsdbCfg *pCfg);
int tsdbCloseRepo(STsdb *pTsdb);
int tsdbForceCloseRepo(STsdb *pTsdb);
// Data commit
int tsdbInsert(STsdb *pTsdb, SSubmitMsg *pMsg);
int tsdbCommit(STsdb *pTsdb);
#ifdef __cplusplus
}
#endif

View File

@ -4,4 +4,8 @@ target_include_directories(
tsdb
PUBLIC "${CMAKE_SOURCE_DIR}/include/server/vnode/tsdb"
PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/inc"
)
target_include_directories(
tsdb
PRIVATE os
)