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
Willemt Raft
Commits
1c6cb689
Commit
1c6cb689
authored
Dec 31, 2015
by
Willem Thiart
Browse files
Make raft_set_commit_idx public
parent
99129dfa
Changes
2
Hide whitespace changes
Inline
Side-by-side
include/raft.h
View file @
1c6cb689
...
...
@@ -565,6 +565,11 @@ void raft_vote(raft_server_t* me_, raft_node_t* node);
* @param[in] term The new current term */
void
raft_set_current_term
(
raft_server_t
*
me
,
const
int
term
);
/** Set the commit idx.
* This should be used to reload persistent state, ie. the commit_idx field.
* @param[in] commit_idx The new commit index. */
void
raft_set_commit_idx
(
raft_server_t
*
me
,
int
commit_idx
);
/** Add an entry to the server's log.
* This should be used to reload persistent state, ie. the commit log.
* @param[in] ety The entry to be appended */
...
...
include/raft_private.h
View file @
1c6cb689
...
...
@@ -89,8 +89,6 @@ int raft_apply_entry(raft_server_t* me_);
* @return 0 if unsuccessful */
int
raft_append_entry
(
raft_server_t
*
me_
,
raft_entry_t
*
c
);
void
raft_set_commit_idx
(
raft_server_t
*
me
,
int
commit_idx
);
void
raft_set_last_applied_idx
(
raft_server_t
*
me
,
int
idx
);
void
raft_set_state
(
raft_server_t
*
me_
,
int
state
);
...
...
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