Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
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
25
func
(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
33
func
New() (*Wal, error) {
34
log, err := wal.Open(FileName, nil)
Callers
1
TestWal_ReadLast
Function · 0.80
Calls
2
Read
Method · 0.65
LastIndex
Method · 0.45
Tested by
1
TestWal_ReadLast
Function · 0.64