diff --git a/source/libs/tkv/inc/tkvInt.h b/source/libs/tkv/inc/tkvDef.h
similarity index 60%
rename from source/libs/tkv/inc/tkvInt.h
rename to source/libs/tkv/inc/tkvDef.h
index 314adce3f5..7433b1a4dd 100644
--- a/source/libs/tkv/inc/tkvInt.h
+++ b/source/libs/tkv/inc/tkvDef.h
@@ -13,15 +13,46 @@
* along with this program. If not, see .
*/
-#ifndef _TD_TKV_INT_H_
-#define _TD_TKV_INT_H_
+#ifndef _TD_TKV_DEF_H_
+#define _TD_TKV_DEF_H_
+
+#ifdef USE_ROCKSDB
+#include
+#endif
#ifdef __cplusplus
extern "C" {
#endif
+struct STkvDb {
+#ifdef USE_ROCKSDB
+ rocksdb_t *db;
+#endif
+};
+
+struct STkvOpts {
+#ifdef USE_ROCKSDB
+ rocksdb_options_t *opts;
+#endif
+};
+
+struct STkvCache {
+ // TODO
+};
+
+struct STkvReadOpts {
+#ifdef USE_ROCKSDB
+ rocksdb_readoptions_t *ropts;
+#endif
+};
+
+struct STkvWriteOpts {
+#ifdef USE_ROCKSDB
+ rocksdb_writeoptions_t *wopts;
+#endif
+};
#ifdef __cplusplus
}
#endif
-#endif /*_TD_TKV_INT_H_*/
\ No newline at end of file
+#endif /*_TD_TKV_DEF_H_*/
\ No newline at end of file
diff --git a/source/libs/tkv/src/tkv.c b/source/libs/tkv/src/tkv.c
index 47213f9f02..a0e2adbfad 100644
--- a/source/libs/tkv/src/tkv.c
+++ b/source/libs/tkv/src/tkv.c
@@ -13,39 +13,8 @@
* along with this program. If not, see .
*/
-#ifdef USE_ROCKSDB
-#include
-#endif
-
#include "tkv.h"
-
-struct STkvDb {
-#ifdef USE_ROCKSDB
- rocksdb_t *db;
-#endif
-};
-
-struct STkvOpts {
-#ifdef USE_ROCKSDB
- rocksdb_options_t *opts;
-#endif
-};
-
-struct STkvCache {
- // TODO
-};
-
-struct STkvReadOpts {
-#ifdef USE_ROCKSDB
- rocksdb_readoptions_t *ropts;
-#endif
-};
-
-struct STkvWriteOpts {
-#ifdef USE_ROCKSDB
- rocksdb_writeoptions_t *wopts;
-#endif
-};
+#include "tkvDef.h"
STkvDb *tkvOpen(const STkvOpts *options, const char *path) {
STkvDb *pDb = NULL;