Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ruanhaishen
Willemt Raft
Commits
1d8c95e1
Commit
1d8c95e1
authored
Feb 14, 2014
by
willem
Browse files
Added header guards
parent
54f73fe4
Changes
3
Show whitespace changes
Inline
Side-by-side
include/raft.h
View file @
1d8c95e1
#ifndef RAFT_H_
#define RAFT_H_
/**
* Copyright (c) 2013, Willem-Hendrik Thiart
* Use of this source code is governed by a BSD-style license that can be
...
...
@@ -324,3 +328,4 @@ int raft_get_nvotes_for_me(raft_server_t* me_);
* @return node ID of who I voted for */
int
raft_get_voted_for
(
raft_server_t
*
me
);
#endif
/* RAFT_H_ */
include/raft_log.h
View file @
1d8c95e1
#ifndef RAFT_LOG_H_
#define RAFT_LOG_H_
typedef
void
*
log_t
;
log_t
*
log_new
();
...
...
@@ -12,3 +15,5 @@ raft_entry_t* log_get_from_idx(log_t* me_, int idx);
raft_entry_t
*
log_peektail
(
log_t
*
me_
);
void
log_mark_peer_has_committed
(
log_t
*
me_
,
int
idx
);
#endif
/* RAFT_LOG_H_ */
include/raft_private.h
View file @
1d8c95e1
#ifndef RAFT_PRIVATE_H_
#define RAFT_PRIVATE_H_
/**
* Copyright (c) 2013, Willem-Hendrik Thiart
* Use of this source code is governed by a BSD-style license that can be
...
...
@@ -106,3 +110,4 @@ void raft_node_set_next_idx(raft_node_t* node, int nextIdx);
int
raft_votes_is_majority
(
const
int
nnodes
,
const
int
nvotes
);
#endif
/* RAFT_PRIVATE_H_ */
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