MCPcopy Create free account
hub / github.com/ByteStorage/FlyDB / ReadLast

Method ReadLast

lib/wal/wal.go:25–31  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

23}
24
25func (w *Wal) ReadLast() ([]byte, error) {
26 index, err := w.log.LastIndex()
27 if err != nil {
28 return nil, err
29 }
30 return w.log.Read(index)
31}
32
33func New() (*Wal, error) {
34 log, err := wal.Open(FileName, nil)

Callers 1

TestWal_ReadLastFunction · 0.80

Calls 2

ReadMethod · 0.65
LastIndexMethod · 0.45

Tested by 1

TestWal_ReadLastFunction · 0.64