Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Log ¶
type Log interface { io.Closer // Writer returns the Raft log writer Writer() Writer // OpenReader opens a Raft log reader OpenReader(index raft.Index) Reader }
Log provides for reading and writing entries in the Raft log
type Reader ¶
type Reader interface { io.Closer // FirstIndex returns the first index in the log FirstIndex() raft.Index // LastIndex returns the last index in the log LastIndex() raft.Index // CurrentIndex returns the current index of the reader CurrentIndex() raft.Index // CurrentEntry returns the current Entry CurrentEntry() *Entry // NextIndex returns the next index in the log NextIndex() raft.Index // NextEntry advances the log index and returns the next entry in the log NextEntry() *Entry // Reset resets the log reader to the given index Reset(index raft.Index) }
Reader supports reading of entries from the Raft log
type Writer ¶
type Writer interface { io.Closer // LastIndex returns the last index written to the log LastIndex() raft.Index // LastEntry returns the last entry written to the log LastEntry() *Entry // Append appends the given entry to the log Append(entry *raft.LogEntry) *Entry // Reset resets the log writer to the given index Reset(index raft.Index) // Truncate truncates the tail of the log to the given index Truncate(index raft.Index) }
Writer supports writing entries to the Raft log
Click to show internal directories.
Click to hide internal directories.