kvstore

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 20, 2018 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KVSTORE_MAGIC_NUM uint16 = 0xF96E
)

Variables

View Source
var NopStore *nopStore = &nopStore{}

Functions

This section is empty.

Types

type KVStore

type KVStore struct {
	// contains filtered or unexported fields
}

func NewKVStore

func NewKVStore(reader io.ReadSeeker, writer io.WriteSeeker) *KVStore

func (*KVStore) Get

func (kv *KVStore) Get(offset int64) (kvData *KVStoreData, err error)

func (*KVStore) Set

func (kv *KVStore) Set(kvData *KVStoreData) (err error)

type KVStoreData

type KVStoreData struct {
	// contains filtered or unexported fields
}

func NewKVStoreData

func NewKVStoreData(key []byte, value []byte) *KVStoreData

func (*KVStoreData) Key

func (kvData *KVStoreData) Key() string

func (*KVStoreData) KeyLength

func (kvData *KVStoreData) KeyLength() uint32

func (*KVStoreData) MarshalBinary

func (kvData *KVStoreData) MarshalBinary() (data []byte, err error)

func (*KVStoreData) Size

func (kvData *KVStoreData) Size() uint32

func (*KVStoreData) UnmarshalBinary

func (kvData *KVStoreData) UnmarshalBinary(data []byte) (err error)

func (*KVStoreData) Value

func (kvData *KVStoreData) Value() []byte

func (*KVStoreData) ValueLength

func (kvData *KVStoreData) ValueLength() uint32

func (*KVStoreData) ValueOffset

func (kvData *KVStoreData) ValueOffset() uint32

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL