Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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_ */