Skip to content

Commit

Permalink
Merge c82e273 into b8ba76e
Browse files Browse the repository at this point in the history
  • Loading branch information
langchr86 committed Jan 21, 2020
2 parents b8ba76e + c82e273 commit 66b610f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 2 additions & 0 deletions .travis.yml
Expand Up @@ -5,7 +5,9 @@ addons:
- "python3"
- "python3-pip"
before_install:
- sudo pip install --upgrade setuptools
- sudo pip install cpp-coveralls
- sudo pip3 install --upgrade setuptools
- sudo pip3 install cffi
- sudo pip3 install colorama
- sudo pip3 install coloredlogs
Expand Down
10 changes: 6 additions & 4 deletions include/raft_types.h
Expand Up @@ -2,27 +2,29 @@
#ifndef RAFT_DEFS_H_
#define RAFT_DEFS_H_

#include <stdint.h>

/**
* Unique entry ids are mostly used for debugging and nothing else,
* so there is little harm if they collide.
*/
typedef int raft_entry_id_t;
typedef int32_t raft_entry_id_t;

/**
* Monotonic term counter.
*/
typedef long int raft_term_t;
typedef int64_t raft_term_t;

/**
* Monotonic log entry index.
*
* This is also used to as an entry count size type.
*/
typedef long int raft_index_t;
typedef int64_t raft_index_t;

/**
* Unique node identifier.
*/
typedef int raft_node_id_t;
typedef int32_t raft_node_id_t;

#endif /* RAFT_DEFS_H_ */

0 comments on commit 66b610f

Please sign in to comment.