open key-database deterministic

This commit is contained in:
6543 2021-12-03 04:15:48 +01:00
parent 796f24262e
commit 5ca5020cfa
No known key found for this signature in database
GPG key ID: C99B82E40B027BAE
8 changed files with 94 additions and 48 deletions

View file

@ -0,0 +1,12 @@
package database
import "github.com/akrylysov/pogreb"
type KeyDB interface {
Sync() error
Put(key []byte, value []byte) error
Get(key []byte) ([]byte, error)
Delete(key []byte) error
Compact() (pogreb.CompactionResult, error)
Items() *pogreb.ItemIterator
}