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

Method Write

lib/wal/wal.go:13–19  ·  view source on GitHub ↗
(data []byte)

Source from the content-addressed store, hash-verified

11}
12
13func (w *Wal) Write(data []byte) error {
14 index, err := w.log.LastIndex()
15 if err != nil {
16 return err
17 }
18 return w.log.Write(index+1, data)
19}
20
21func (w *Wal) Read(index uint64) ([]byte, error) {
22 return w.log.Read(index)

Callers 4

PutMethod · 0.95
GetMethod · 0.95
DeleteMethod · 0.95
UpdateMethod · 0.95

Calls 2

WriteMethod · 0.65
LastIndexMethod · 0.45

Tested by

no test coverage detected