getEntry gets the entry at the slot idx.
(idx int)
| 144 | |
| 145 | // getEntry gets the entry at the slot idx. |
| 146 | func (lf *logFile) getEntry(idx int) entry { |
| 147 | if lf == nil { |
| 148 | return emptyEntry |
| 149 | } |
| 150 | x.AssertTrue(idx < maxNumEntries) |
| 151 | offset := idx * entrySize |
| 152 | return entry(lf.Data[offset : offset+entrySize]) |
| 153 | } |
| 154 | |
| 155 | // GetRaftEntry gets the entry at the index idx, reads the data from the appropriate |
| 156 | // offset and converts it to a raftpb.Entry object. |
no test coverage detected