A buggy implementation of the raft paper/ consensus algorithm.
This is by no means production ready and there is little aspiration to get there. If you search for a working solution, go look at a proper implementation like go.etcd.io/etcd/raft or github.com/hashicorp/raft instead.