File
Blob: kv/aof/read_only.go
| 1 | package aof |
| 2 | |
| 3 | import ( |
| 4 | "context" |
| 5 | |
| 6 | "go.miragespace.co/specter/spec/protocol" |
| 7 | ) |
| 8 | |
| 9 | func (d *DiskKV) Get(ctx context.Context, key []byte) (value []byte, err error) { |
| 10 | return d.memKv.Get(ctx, key) |
| 11 | } |
| 12 | |
| 13 | func (d *DiskKV) PrefixList(ctx context.Context, prefix []byte) (children [][]byte, err error) { |
| 14 | return d.memKv.PrefixList(ctx, prefix) |
| 15 | } |
| 16 | |
| 17 | func (d *DiskKV) PrefixContains(ctx context.Context, prefix []byte, child []byte) (bool, error) { |
| 18 | return d.memKv.PrefixContains(ctx, prefix, child) |
| 19 | } |
| 20 | |
| 21 | func (d *DiskKV) ListKeys(ctx context.Context, prefix []byte) ([]*protocol.KeyComposite, error) { |
| 22 | return d.memKv.ListKeys(ctx, prefix) |
| 23 | } |
| 24 | |
| 25 | func (d *DiskKV) Export(ctx context.Context, keys [][]byte) ([]*protocol.KVTransfer, error) { |
| 26 | return d.memKv.Export(ctx, keys) |
| 27 | } |
| 28 | |
| 29 | func (d *DiskKV) RangeKeys(ctx context.Context, low, high uint64) ([][]byte, error) { |
| 30 | return d.memKv.RangeKeys(ctx, low, high) |
| 31 | } |