struct
Raft::RPC::AppendEntries
- Raft::RPC::AppendEntries
- Struct
- Value
- Object
Overview
Sent by the leader to replicate log entries and serve as heartbeat.
An empty #entries array acts as a heartbeat without appending any entries.
Defined in:
raft/rpc.crConstructors
Instance Method Summary
-
#entries : Array(Log::Entry)
Log entries to append (empty for heartbeats).
-
#leader_commit : UInt64
The leader's commit index.
-
#leader_id : String
The ID of the leader, so followers can redirect clients.
-
#prev_log_index : UInt64
Index of the log entry immediately preceding the new entries.
-
#prev_log_term : UInt64
Term of the entry at
#prev_log_index. -
#term : UInt64
The leader's current term.
- #type : Type
Constructor Detail
def self.new(term : UInt64, leader_id : String, prev_log_index : UInt64, prev_log_term : UInt64, entries : Array(Log::Entry), leader_commit : UInt64)
#