-
Notifications
You must be signed in to change notification settings - Fork 3
/
kvs.h
30 lines (26 loc) · 795 Bytes
/
kvs.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/*============================================================================
# Author: Wade Leng
# E-mail: [email protected]
# Last modified: 2012-02-04 16:59
# Filename: kvs.h
# Description:
============================================================================*/
#ifndef KVS_INTERFACE
#define KVS_INTERFACE
#include "type.h"
typedef struct KVS_ENV
{
enum init_enum init_type;
char* disk_file_path;
char* IMAGE_file_path;
char* log_file_path;
int buffer_sleep_time;
int buffer_horizon_size;
int buffer_size;
}KVS_ENV;
int kv_init(const KVS_ENV* kvs);
int kv_exit();
int kv_put(const char* key, int key_size, const char* value, int value_size);
int kv_get(const char* key, int key_size, char* buf, int* buf_size);
int kv_delete(const char* key, int key_size);
#endif