Protocol-agnostic implementation of the Raft consensus algorithm