Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
RedisLabs Raft
Commits
476455d0
Commit
476455d0
authored
Nov 06, 2015
by
Willem Thiart
Browse files
raft_entry == msg_entry
parent
e4c4029e
Changes
1
Hide whitespace changes
Inline
Side-by-side
include/raft.h
View file @
476455d0
...
@@ -18,20 +18,22 @@ typedef struct
...
@@ -18,20 +18,22 @@ typedef struct
unsigned
int
len
;
unsigned
int
len
;
}
raft_entry_data_t
;
}
raft_entry_data_t
;
/** Message sent from client to server.
/** Entry that is stored in the server's entry log. */
* The client sends this message to a server with the intention of having it
* applied to the FSM. */
typedef
struct
typedef
struct
{
{
/** the term the
entry
was created */
/** the
entry's
term
at
the
point it
was created */
int
term
;
unsigned
int
term
;
/** the entry's unique ID
/** the entry's unique ID */
* The ID is used to prevent duplicate entries from being appended */
unsigned
int
id
;
unsigned
int
id
;
raft_entry_data_t
data
;
raft_entry_data_t
data
;
}
msg_entry_t
;
}
raft_entry_t
;
/** Message sent from client to server.
* The client sends this message to a server with the intention of having it
* applied to the FSM. */
typedef
raft_entry_t
msg_entry_t
;
/** Entry message response.
/** Entry message response.
* Indicates to client if entry was committed or not. */
* Indicates to client if entry was committed or not. */
...
@@ -129,18 +131,6 @@ typedef struct
...
@@ -129,18 +131,6 @@ typedef struct
typedef
void
*
raft_server_t
;
typedef
void
*
raft_server_t
;
typedef
void
*
raft_node_t
;
typedef
void
*
raft_node_t
;
/** Entry that is stored in the server's entry log. */
typedef
struct
{
/** the entry's term at the point it was created */
unsigned
int
term
;
/** the entry's unique ID */
unsigned
int
id
;
raft_entry_data_t
data
;
}
raft_entry_t
;
/** Callback for sending request vote messages.
/** Callback for sending request vote messages.
* @param[in] raft The Raft server making this callback
* @param[in] raft The Raft server making this callback
* @param[in] user_data User data that is passed from Raft server
* @param[in] user_data User data that is passed from Raft server
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment