struct

Raft::Message

Inherits Struct < Value < Object

Constants

PROTOCOL_VERSION = 1_u8

Constructors

from_io(io : IO, max_payload : UInt32, format : IO::ByteFormat = IO::ByteFormat::LittleEndian) : self
Source
new(protocol_version : UInt8 = PROTOCOL_VERSION, group_id : UInt64 = 0_u64, type : MessageType = MessageType::AppendEntries, from : NodeID = 0_u64, term : UInt64 = 0_u64, prev_log_index : UInt64 = 0_u64, prev_log_term : UInt64 = 0_u64, commit_index : UInt64 = 0_u64, last_log_index : UInt64 = 0_u64, last_log_term : UInt64 = 0_u64, success : Bool = false, reject_hint : UInt64 = 0_u64, entries_data : Bytes = Bytes.new(0), entries_count : UInt32 = 0_u32)
Source

Instance methods

commit_index
Source
commit_index=(commit_index : UInt64)
Source
entries_count
Source
entries_count=(entries_count : UInt32)
Source
entries_data
Source
entries_data=(entries_data : Bytes)
Source
from
Source
from=(from : NodeID)
Source
group_id
Source
group_id=(group_id : UInt64)
Source
last_log_index
Source
last_log_index=(last_log_index : UInt64)
Source
last_log_term
Source
last_log_term=(last_log_term : UInt64)
Source
prev_log_index
Source
prev_log_index=(prev_log_index : UInt64)
Source
prev_log_term
Source
prev_log_term=(prev_log_term : UInt64)
Source
protocol_version
Source
protocol_version=(protocol_version : UInt8)
Source
reject_hint
Source
reject_hint=(reject_hint : UInt64)
Source
success
Source
success=(success : Bool)
Source
term
Source
term=(term : UInt64)
Source
type
Source
type=(type : MessageType)
Source