struct Raft::RPC::InstallSnapshot

Overview

Sent by the leader to transfer a snapshot to a lagging follower.

Large snapshots are sent in multiple chunks. Each chunk carries an #offset and #data slice. The final chunk sets done to true.

Defined in:

raft/rpc.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(term : UInt64, leader_id : String, last_included_index : UInt64, last_included_term : UInt64, offset : UInt64, data : Bytes, done : Bool) #

[View source]

Instance Method Detail

def data : Bytes #

Raw snapshot data for this chunk.


[View source]
def done? : Bool #

true if this is the final chunk of the snapshot.


[View source]
def last_included_index : UInt64 #

The last log index included in the snapshot.


[View source]
def last_included_term : UInt64 #

The term of the last included log entry.


[View source]
def leader_id : String #

The ID of the leader.


[View source]
def offset : UInt64 #

Byte offset of this chunk within the full snapshot.


[View source]
def term : UInt64 #

The leader's current term.


[View source]
def type : Type #

[View source]