struct

Raft::LogEntry(T)

Inherits Struct < Value < Object

Constants

HEADER_BYTESIZE = (((sizeof(UInt64)) + (sizeof(UInt64))) + (sizeof(UInt8))) + (sizeof(UInt32))

term (u64) + index (u64) + entry_type (u8) + data_size_prefix (u32)

Constructors

from_io(io : IO, format : IO::ByteFormat = IO::ByteFormat::LittleEndian) : self
Source
new(term : UInt64, index : UInt64, entry_type : EntryType, data : T | Nil = nil, config_data : Bytes = Bytes.new(0))
Source

Instance methods

bytesize

Number of bytes this entry occupies when serialized via to_io. Requires T#bytesize to match what T#to_io writes.

Source
config_data
Source
data
Source
entry_type
Source
index
Source
term
Source