Asynchronous C implementation of the Raft consensus protocol https://raft.readthedocs.io
  • C 96.4%
  • M4 3.1%
  • Makefile 0.4%
  • Shell 0.1%
Find a file
Free Ekanayaka 148951f79a
Document memory ownership of the raft_event structure passed to raft_step (#199)
This PR adds documentation for the memory ownership expected of the
raft_event structure passed to raft_step. Closes #194.
2025-12-27 21:39:47 +00:00
.github/workflows github: Add container, network and storage Incus test targets 2025-11-30 13:11:25 +00:00
ac Initial implementation 2018-10-30 11:52:00 +01:00
docs docs: Add memory ownership info for RAFT_START and RAFT_RECEIVE 2025-12-03 19:14:42 +00:00
example raft/uv.h: Add version to struct raft_uv_transport. 2022-12-07 13:54:41 +01:00
include changed documentation for RECEIVE 2025-12-03 13:08:48 +00:00
m4 Rename raft-check-flags.m4 to attributes.m4 2020-06-06 08:10:03 +01:00
src v1: Memory ownership of RAFT_CONFIGURATION event 2025-12-04 11:19:05 +00:00
test v1: Memory ownership of RAFT_CONFIGURATION event 2025-12-04 11:19:05 +00:00
tools/benchmark raft.h: Drop compatibility with the legacy struct raft_tracer 2024-01-11 16:21:30 +00:00
.clang-format clang-format: Add ForEachMacros: ['QUEUE_FOREACH'] 2023-04-12 10:02:18 +02:00
.dir-locals.el flycheck: Add -Wconversion to clang flags 2023-08-13 15:25:48 +01:00
.gitignore build: Generate raft.h from raft.h.in 2024-01-12 13:01:39 +00:00
.readthedocs.yaml readthedocs: Install furo via requirements.txt 2024-02-10 18:18:34 +00:00
.travis.yml Don't compress snapshots 2023-09-07 16:19:18 +01:00
amalgamation.json timeout: Rename tick.c to timeout.c 2024-02-04 11:31:29 +00:00
AUTHORS AUTHORS: Use git 2021-11-02 22:59:55 -04:00
configure.ac test: Don't fail when kernel has tmpfs with direct I/O support 2025-04-04 23:23:02 +01:00
LICENSE [doc] LICENCE: Update copyright notice 2023-08-09 16:49:57 +01:00
Makefile.am timeout: Rename tick.c to timeout.c 2024-02-04 11:31:29 +00:00
raft.pc.in Revert addition of Requires.private to raft.pc 2023-03-09 16:17:26 -05:00
README.md docs: Improve README headline 2024-02-10 15:55:00 +00:00

tests codecov Documentation Status Coverity

Production grade asynchronous C implementation of the Raft consensus protocol.

Documentation

See readthedocs for the full documentation.

Building

autoreconf -i
./configure
make

History

This library is a fork of Canonical's Raft implementation, which was originally written by this library's author himself while working at Canonical.

It is a fully compatible drop-in replacement of Canonical's version, at least up to v0.18.0.

License

This raft C library is released under a slightly modified version of LGPLv3, that includes a copyright exception letting users to statically link the library code in their project and release the final work under their own terms. See the full license text.

Notable users

Credits

Of course the biggest thanks goes to Diego Ongaro :) (the original author of the Raft dissertation).

A lot of ideas and inspiration was taken from other Raft implementations such as: