Implement committal
This commit is contained in:
20
Raft/Domain.fs
Normal file
20
Raft/Domain.fs
Normal 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
|
Reference in New Issue
Block a user