已有数据同步功能完成
This commit is contained in:
10
kvstore.h
10
kvstore.h
@@ -4,7 +4,7 @@
|
||||
#ifndef __KV_STORE_H__
|
||||
#define __KV_STORE_H__
|
||||
|
||||
|
||||
#include "diskuring/diskuring.h"
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
@@ -82,7 +82,7 @@ int kvs_array_mod_bin(kvs_array_t *inst,
|
||||
int kvs_array_exist_bin(kvs_array_t *inst, const void *key, uint32_t key_len);
|
||||
|
||||
|
||||
int kvs_array_save(kvs_array_t *inst, const char* filename);
|
||||
int kvs_array_save(iouring_ctx_t *uring, kvs_array_t *inst, const char* filename);
|
||||
int kvs_array_load(kvs_array_t *inst, const char* filename);
|
||||
|
||||
#else
|
||||
@@ -146,7 +146,7 @@ int kvs_rbtree_del(rbtree *inst, const void *key, uint32_t key_len);
|
||||
int kvs_rbtree_mod(kvs_rbtree_t *inst, const void *key, uint32_t key_len, const void *value, uint32_t value_len);
|
||||
int kvs_rbtree_exist(kvs_rbtree_t *inst, const void *key, uint32_t key_len);
|
||||
|
||||
int kvs_rbtree_save(kvs_rbtree_t *inst, const char* filename);
|
||||
int kvs_rbtree_save(iouring_ctx_t *uring, kvs_rbtree_t *inst, const char* filename);
|
||||
int kvs_rbtree_load(kvs_rbtree_t *inst, const char* filename);
|
||||
#else
|
||||
#define ENABLE_KEY_CHAR 1
|
||||
@@ -220,7 +220,7 @@ int kvs_hash_del_bin(kvs_hash_t *h, const void *key, uint32_t key_len);
|
||||
int kvs_hash_exist_bin(kvs_hash_t *h, const void *key, uint32_t key_len);
|
||||
int kvs_hash_count(kvs_hash_t *h);
|
||||
|
||||
int kvs_hash_save(kvs_hash_t *inst, const char* filename);
|
||||
int kvs_hash_save(iouring_ctx_t *uring, kvs_hash_t *inst, const char* filename);
|
||||
int kvs_hash_load(kvs_hash_t *inst, const char* filename);
|
||||
#else
|
||||
|
||||
@@ -279,7 +279,7 @@ extern kvs_rbtree_t global_rbtree;
|
||||
extern kvs_hash_t global_hash;
|
||||
#endif
|
||||
|
||||
void __compeleted_cmd(const uint8_t *cmd, size_t len);
|
||||
void __completed_cmd(const uint8_t *cmd, size_t len);
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user