struct Raft::Log::Entry

Overview

A single entry in the Raft log.

Entries are 1-indexed. Each entry records the Raft term in which it was created, its type, and an opaque data payload.

Defined in:

raft/log/entry.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(index : UInt64, term : UInt64, entry_type : EntryType, data : Bytes = Bytes.empty) #

[View source]

Instance Method Detail

def data : Bytes #

The opaque payload. For Op entries this is the client command; for Config entries this is the serialized peer list.


[View source]
def entry_type : EntryType #

The type of this entry (Noop, Op, or Config).


[View source]
def index : UInt64 #

The 1-based position of this entry in the log.


[View source]
def term : UInt64 #

The Raft term when this entry was created.


[View source]