Documentation ¶
Index ¶
- Constants
- func ByteSize(s KVStoreReader) int
- func MustGet(kvs KVStoreReader, key Key) []byte
- func MustHas(kvs KVStoreReader, key Key) bool
- func MustIterate(kvs KVStoreReader, prefix Key, f func(key Key, value []byte) bool)
- func MustIterateKeys(kvs KVStoreReader, prefix Key, f func(key Key) bool)
- func MustIterateKeysSorted(kvs KVStoreReader, prefix Key, f func(key Key) bool)
- func MustIterateSorted(kvs KVStoreReader, prefix Key, f func(key Key, value []byte) bool)
- type DBError
- type HiveKVStoreReader
- func (h *HiveKVStoreReader) Get(key Key) ([]byte, error)
- func (h *HiveKVStoreReader) Has(key Key) (bool, error)
- func (h *HiveKVStoreReader) Iterate(prefix Key, f func(key Key, value []byte) bool) error
- func (h *HiveKVStoreReader) IterateKeys(prefix Key, f func(key Key) bool) error
- func (h *HiveKVStoreReader) IterateKeysSorted(prefix Key, f func(key Key) bool) error
- func (h *HiveKVStoreReader) IterateSorted(prefix Key, f func(key Key, value []byte) bool) error
- func (h *HiveKVStoreReader) MustGet(key Key) []byte
- func (h *HiveKVStoreReader) MustHas(key Key) bool
- func (h *HiveKVStoreReader) MustIterate(prefix Key, f func(key Key, value []byte) bool)
- func (h *HiveKVStoreReader) MustIterateKeys(prefix Key, f func(key Key) bool)
- func (h *HiveKVStoreReader) MustIterateKeysSorted(prefix Key, f func(key Key) bool)
- func (h *HiveKVStoreReader) MustIterateSorted(prefix Key, f func(key Key, value []byte) bool)
- type Item
- type Items
- type KVIterator
- type KVMustIterator
- type KVMustReader
- type KVReader
- type KVStore
- type KVStoreReader
- type KVWriter
- type Key
Constants ¶
View Source
const EmptyPrefix = Key("")
Variables ¶
This section is empty.
Functions ¶
func ByteSize ¶ added in v0.2.0
func ByteSize(s KVStoreReader) int
func MustGet ¶ added in v0.1.0
func MustGet(kvs KVStoreReader, key Key) []byte
func MustHas ¶ added in v0.1.0
func MustHas(kvs KVStoreReader, key Key) bool
func MustIterate ¶ added in v0.1.0
func MustIterate(kvs KVStoreReader, prefix Key, f func(key Key, value []byte) bool)
func MustIterateKeys ¶ added in v0.1.0
func MustIterateKeys(kvs KVStoreReader, prefix Key, f func(key Key) bool)
func MustIterateKeysSorted ¶ added in v0.2.0
func MustIterateKeysSorted(kvs KVStoreReader, prefix Key, f func(key Key) bool)
func MustIterateSorted ¶ added in v0.2.0
func MustIterateSorted(kvs KVStoreReader, prefix Key, f func(key Key, value []byte) bool)
Types ¶
type HiveKVStoreReader ¶ added in v0.2.0
type HiveKVStoreReader struct {
// contains filtered or unexported fields
}
HiveKVStoreReader is an implementation of KVStoreReader with an instance of hive's kvstore.KVStore as backend.
func NewHiveKVStoreReader ¶ added in v0.2.0
func NewHiveKVStoreReader(db kvstore.KVStore) *HiveKVStoreReader
func (*HiveKVStoreReader) Get ¶ added in v0.2.0
func (h *HiveKVStoreReader) Get(key Key) ([]byte, error)
Get returns the value, or nil if not found
func (*HiveKVStoreReader) Has ¶ added in v0.2.0
func (h *HiveKVStoreReader) Has(key Key) (bool, error)
func (*HiveKVStoreReader) IterateKeys ¶ added in v0.2.0
func (h *HiveKVStoreReader) IterateKeys(prefix Key, f func(key Key) bool) error
func (*HiveKVStoreReader) IterateKeysSorted ¶ added in v0.2.0
func (h *HiveKVStoreReader) IterateKeysSorted(prefix Key, f func(key Key) bool) error
func (*HiveKVStoreReader) IterateSorted ¶ added in v0.2.0
func (*HiveKVStoreReader) MustGet ¶ added in v0.2.0
func (h *HiveKVStoreReader) MustGet(key Key) []byte
MustGet returns the value, or nil if not found
func (*HiveKVStoreReader) MustHas ¶ added in v0.2.0
func (h *HiveKVStoreReader) MustHas(key Key) bool
func (*HiveKVStoreReader) MustIterate ¶ added in v0.2.0
func (h *HiveKVStoreReader) MustIterate(prefix Key, f func(key Key, value []byte) bool)
func (*HiveKVStoreReader) MustIterateKeys ¶ added in v0.2.0
func (h *HiveKVStoreReader) MustIterateKeys(prefix Key, f func(key Key) bool)
func (*HiveKVStoreReader) MustIterateKeysSorted ¶ added in v0.2.0
func (h *HiveKVStoreReader) MustIterateKeysSorted(prefix Key, f func(key Key) bool)
func (*HiveKVStoreReader) MustIterateSorted ¶ added in v0.2.0
func (h *HiveKVStoreReader) MustIterateSorted(prefix Key, f func(key Key, value []byte) bool)
type KVIterator ¶ added in v0.2.0
type KVMustIterator ¶ added in v0.2.0
type KVMustReader ¶ added in v0.2.0
type KVStore ¶
type KVStore interface { KVWriter KVStoreReader }
KVStore represents a key-value store where both keys and values are arbitrary byte slices.
type KVStoreReader ¶ added in v0.1.0
type KVStoreReader interface { KVReader KVIterator KVMustReader KVMustIterator }
Click to show internal directories.
Click to hide internal directories.