Raft::Log(T)
Constructors
new(config : Config)
SourceInstance methods
append(term : UInt64, data : T | Nil = nil, entry_type : EntryType = EntryType::Normal, config_data : Bytes = Bytes.new(0)) : LogEntry(T)
SourceResolve index to {segment_fd, byte_offset, byte_length} for zero-copy
senders (e.g., sendfile/splice/io_uring). Returns nil if the index has
been compacted away or is past EOF.
close
Sourcefirst_index
Sourcelast_index
Sourcelast_term
Sourcereset
Sourcereset_to(index : UInt64)
Reset the log to a specific index, as after installing a snapshot. After this call, @last_index == index and the next append produces index + 1.
segment_count
Sourcesync
Source