0
0
bleve/index/store/kvstore.go
Marty Schoch d48eee948e refactored index to separate out kv storage
now how pluggable options for
leveldb
gouchstore
in memory only
2014-05-09 16:37:04 -04:00

33 lines
471 B
Go

package store
type KVBatch interface {
Set(key, val []byte)
Delete(key []byte)
Execute() error
Close() error
}
type KVIterator interface {
SeekFirst()
Seek([]byte)
Next()
Current() ([]byte, []byte, bool)
Key() []byte
Value() []byte
Valid() bool
Close()
}
type KVStore interface {
Get(key []byte) ([]byte, error)
Set(key, val []byte) error
Delete(key []byte) error
Commit() error
Close() error
Iterator(key []byte) KVIterator
NewBatch() KVBatch
}