struct Raft::RPC::PreVote

Overview

Sent before a real election to check if the candidate would win, without incrementing its term. Prevents partitioned nodes from disrupting the cluster with inflated terms.

Defined in:

raft/rpc.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(term : UInt64, candidate_id : String, last_log_index : UInt64, last_log_term : UInt64) #

[View source]

Instance Method Detail

def candidate_id : String #

The ID of the candidate.


[View source]
def last_log_index : UInt64 #

Index of the candidate's last log entry.


[View source]
def last_log_term : UInt64 #

Term of the candidate's last log entry.


[View source]
def term : UInt64 #

The speculative next term (current term + 1, not yet committed).


[View source]
def type : Type #

[View source]