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

Method Put

lib/wal/wal_db.go:11–21  ·  view source on GitHub ↗
(key []byte, value []byte)

Source from the content-addressed store, hash-verified

9}
10
11func (w *Wal) Put(key []byte, value []byte) error {
12 marshal, err := json.Marshal(&WriteMessage{
13 Key: key,
14 Value: value,
15 Type: 0,
16 })
17 if err != nil {
18 return err
19 }
20 return w.Write(marshal)
21}
22
23func (w *Wal) Get(key []byte) error {
24 marshal, err := json.Marshal(&WriteMessage{

Callers

nothing calls this directly

Calls 1

WriteMethod · 0.95

Tested by

no test coverage detected