refact
This commit is contained in:
parent
3908cbd341
commit
3347de549f
|
@ -24,16 +24,32 @@ extern "C" {
|
||||||
|
|
||||||
typedef struct STsdb STsdb;
|
typedef struct STsdb STsdb;
|
||||||
typedef struct {
|
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;
|
} STsdbCfg;
|
||||||
|
|
||||||
int tsdbInit(int nthreads);
|
// Module init and clear
|
||||||
int tsdbClear();
|
int tsdbInit();
|
||||||
|
int tsdbClear();
|
||||||
|
|
||||||
|
// Repository operations
|
||||||
int tsdbCreateRepo(int id);
|
int tsdbCreateRepo(int id);
|
||||||
int tsdbDropRepo(int id);
|
int tsdbDropRepo(int id);
|
||||||
STsdb *tsdbOpenRepo(STsdbCfg *pCfg);
|
STsdb *tsdbOpenRepo(STsdbCfg *pCfg);
|
||||||
int tsdbCloseRepo(STsdb *pTsdb);
|
int tsdbCloseRepo(STsdb *pTsdb);
|
||||||
int tsdbForceCloseRepo(STsdb *pTsdb);
|
int tsdbForceCloseRepo(STsdb *pTsdb);
|
||||||
|
|
||||||
|
// Data commit
|
||||||
|
int tsdbInsert(STsdb *pTsdb, SSubmitMsg *pMsg);
|
||||||
|
int tsdbCommit(STsdb *pTsdb);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -4,4 +4,8 @@ target_include_directories(
|
||||||
tsdb
|
tsdb
|
||||||
PUBLIC "${CMAKE_SOURCE_DIR}/include/server/vnode/tsdb"
|
PUBLIC "${CMAKE_SOURCE_DIR}/include/server/vnode/tsdb"
|
||||||
PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/inc"
|
PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/inc"
|
||||||
|
)
|
||||||
|
target_include_directories(
|
||||||
|
tsdb
|
||||||
|
PRIVATE os
|
||||||
)
|
)
|
Loading…
Reference in New Issue