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,12 @@
namespace NATS.Server.Raft;
public sealed class VoteRequest
{
public int Term { get; init; }
public string CandidateId { get; init; } = string.Empty;
}
public sealed class VoteResponse
{
public bool Granted { get; init; }
}