mirror of
https://github.com/gogrlx/bitcask.git
synced 2026-04-02 02:58:59 -07:00
Makefile setup & key/value coherent datatypes & refactoring (#98)
* internal/data: comment exported functions * internal/data: make smaller codec exported api surface * make key and value sizes serializing bubble up to everything * Makefile setup & go mod tidy
This commit is contained in:
@@ -8,7 +8,7 @@ import (
|
||||
)
|
||||
|
||||
type Indexer interface {
|
||||
Load(path string, maxkeySize int) (art.Tree, bool, error)
|
||||
Load(path string, maxkeySize uint32) (art.Tree, bool, error)
|
||||
Save(t art.Tree, path string) error
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ func NewIndexer() Indexer {
|
||||
|
||||
type indexer struct{}
|
||||
|
||||
func (i *indexer) Load(path string, maxKeySize int) (art.Tree, bool, error) {
|
||||
func (i *indexer) Load(path string, maxKeySize uint32) (art.Tree, bool, error) {
|
||||
t := art.New()
|
||||
|
||||
if !internal.Exists(path) {
|
||||
|
||||
Reference in New Issue
Block a user