提交 96ff30a5 编写于 作者: S Shengliang Guan

format code

上级 73b7bef1
...@@ -13,8 +13,8 @@ ...@@ -13,8 +13,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef TDENGINE_RAFT_SYNC_H #ifndef _TD_LIBS_SYNC_H
#define TDENGINE_RAFT_SYNC_H #define _TD_LIBS_SYNC_H
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
...@@ -27,7 +27,7 @@ extern "C" { ...@@ -27,7 +27,7 @@ extern "C" {
typedef uint32_t SyncNodeId; typedef uint32_t SyncNodeId;
typedef int32_t SyncGroupId; typedef int32_t SyncGroupId;
typedef int64_t SyncIndex; typedef int64_t SyncIndex;
typedef uint64_t SSyncTerm; typedef uint64_t SyncTerm;
typedef enum { typedef enum {
TAOS_SYNC_ROLE_FOLLOWER = 0, TAOS_SYNC_ROLE_FOLLOWER = 0,
...@@ -59,7 +59,6 @@ typedef struct { ...@@ -59,7 +59,6 @@ typedef struct {
ESyncRole* role; ESyncRole* role;
} SNodesRole; } SNodesRole;
struct SSyncFSM;
typedef struct SSyncFSM { typedef struct SSyncFSM {
void* pData; void* pData;
...@@ -87,7 +86,7 @@ typedef struct SSyncFSM { ...@@ -87,7 +86,7 @@ typedef struct SSyncFSM {
typedef struct SSyncServerState { typedef struct SSyncServerState {
SyncNodeId voteFor; SyncNodeId voteFor;
SSyncTerm term; SyncTerm term;
} SSyncServerState; } SSyncServerState;
typedef struct SStateManager { typedef struct SStateManager {
...@@ -118,15 +117,15 @@ typedef struct { ...@@ -118,15 +117,15 @@ typedef struct {
int32_t syncInit(); int32_t syncInit();
void syncCleanUp(); void syncCleanUp();
SyncNodeId syncStart(const SSyncInfo *); SyncNodeId syncStart(const SSyncInfo*);
void syncStop(SyncNodeId); void syncStop(SyncNodeId);
int32_t syncPropose(SyncNodeId nodeId, SSyncBuffer buffer, void *pData, bool isWeak); int32_t syncPropose(SyncNodeId nodeId, SSyncBuffer buffer, void* pData, bool isWeak);
extern int32_t raftDebugFlag; extern int32_t syncDebugFlag;
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif // TDENGINE_RAFT_SYNC_H #endif /*_TD_LIBS_SYNC_H*/
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册