So I just noticed this project has 35 stars and 5 forks, which is a lot for me.
I'd advise you not to actually use this code. It's a big mess and needs a reboot.
An implementation of the RAFT consensus algorithm.
You may be interested in this paper and this video on exactly how RAFT works.