comment log store

This commit is contained in:
Minghao Li 2022-02-27 14:17:21 +08:00
parent 4afcb4387c
commit c12c0df80e
1 changed files with 24 additions and 0 deletions

View File

@ -16,6 +16,28 @@
#include "syncRaftStore.h" #include "syncRaftStore.h"
#include "cJSON.h" #include "cJSON.h"
// to complie success: FileIO interface is modified
SRaftStore *raftStoreOpen(const char *path) { return NULL;}
static int32_t raftStoreInit(SRaftStore *pRaftStore) { return 0;}
int32_t raftStoreClose(SRaftStore *pRaftStore) { return 0;}
int32_t raftStorePersist(SRaftStore *pRaftStore) { return 0;}
static bool raftStoreFileExist(char *path) { return 0;}
int32_t raftStoreSerialize(SRaftStore *pRaftStore, char *buf, size_t len) { return 0;}
int32_t raftStoreDeserialize(SRaftStore *pRaftStore, char *buf, size_t len) { return 0;}
void raftStorePrint(SRaftStore *pRaftStore) {}
#if 0
SRaftStore *raftStoreOpen(const char *path) { SRaftStore *raftStoreOpen(const char *path) {
int32_t ret; int32_t ret;
@ -129,3 +151,5 @@ void raftStorePrint(SRaftStore *pRaftStore) {
raftStoreSerialize(pRaftStore, storeBuf, sizeof(storeBuf)); raftStoreSerialize(pRaftStore, storeBuf, sizeof(storeBuf));
printf("%s\n", storeBuf); printf("%s\n", storeBuf);
} }
#endif