Implement committal

This commit is contained in:
Smaug123
2022-10-27 21:31:48 +01:00
parent 15a035ec8e
commit 3c40471d7e
11 changed files with 544 additions and 338 deletions

20
Raft/Domain.fs Normal file
View File

@@ -0,0 +1,20 @@
namespace Raft
/// LogIndex is indexed from 1. We use 0 to indicate "before any history has started".
[<Measure>]
type LogIndex
[<Measure>]
type Term
[<Measure>]
type ServerId
type LogEntry =
{
Index : int<LogIndex>
Term : int<Term>
}
override this.ToString () =
sprintf "Log entry %i at subjective term %i" this.Index this.Term