struct

Raft::RPC::AppendEntries

Inherits Struct < Value < Object

Sent by the leader to replicate log entries and serve as heartbeat.

An empty entries array acts as a heartbeat without appending any entries.

Constructors

new(term : UInt64, leader_id : String, prev_log_index : UInt64, prev_log_term : UInt64, entries : Array(Log::Entry), leader_commit : UInt64)
Source

Instance methods

entries

Log entries to append (empty for heartbeats).

Source
leader_commit

The leader's commit index.

Source
leader_id

The ID of the leader, so followers can redirect clients.

Source
prev_log_index

Index of the log entry immediately preceding the new entries.

Source
prev_log_term

Term of the entry at prev_log_index.

Source
term

The leader's current term.

Source
type
Source