feat: implement raft election and term state

This commit is contained in:
Joseph Doherty
2026-02-23 06:11:28 -05:00
parent f1d3c19594
commit 66ec378bdc
4 changed files with 125 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
namespace NATS.Server.Raft;
public sealed class RaftTermState
{
public int CurrentTerm { get; set; }
public string? VotedFor { get; set; }
}
public enum RaftRole
{
Follower,
Candidate,
Leader,
}