types

package
v0.0.0-...-19f5321 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2020 License: BSD-2-Clause Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CacheStatus

type CacheStatus int
const (
	//nolint
	Missed      CacheStatus = 0
	Hit         CacheStatus = 1
	JustDeleted CacheStatus = -1
)

type KObjStore

type KObjStore interface {
	Get(key []byte) []byte
	GetObj(key []byte, ptr *Serializable)
	GetReadOnlyObj(key []byte, ptr *Serializable)
	Has(key []byte) bool

	Iterator(start, end []byte) ObjIterator
	ReverseIterator(start, end []byte) ObjIterator

	Set(key, value []byte)
	SetObj(key []byte, obj Serializable)
	Delete(key []byte)
}

type MultiStoreI

type MultiStoreI interface {
	Has(key []byte) bool
	Get(key []byte) []byte
	GetObj(key []byte, ptr *Serializable)
	GetReadOnlyObj(key []byte, ptr *Serializable)
	Set(key, value []byte)
	SetObj(key []byte, obj Serializable)
	Delete(key []byte)
	Close(writeBack bool)
	Iterator(start, end []byte) ObjIterator
	ReverseIterator(start, end []byte) ObjIterator
}

type ObjIterator

type ObjIterator interface {
	Domain() (start []byte, end []byte)
	Valid() bool
	Next()
	Key() (key []byte)
	Value() (value []byte)
	ObjValue(ptr *Serializable)
	Close()
}

type RootStoreI

type RootStoreI interface {
	GetTrunkStore() interface{}
	SetHeight(h int64)
	Get(key []byte) []byte
	GetObjCopy(key []byte, ptr *Serializable)
	GetReadOnlyObj(key []byte, ptr *Serializable)
	Has(key []byte) bool
	PrepareForUpdate(key []byte)
	PrepareForDeletion(key []byte)
	Iterator(start, end []byte) ObjIterator
	ReverseIterator(start, end []byte) ObjIterator
	BeginWrite()
	Set(key, value []byte)
	SetObj(key []byte, obj Serializable)
	Delete(key []byte)
	EndWrite()
	CheckConsistency()
	Close()
	ActiveCount() int
}

type Serializable

type Serializable interface {
	ToBytes() []byte
	FromBytes([]byte)
	DeepCopy() interface{}
}

type StoreKey

type StoreKey interface {
	Name() string
	Prefix() string
}

type StrStoreKey

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

func NewStrStoreKey

func NewStrStoreKey(name, prefix string) *StrStoreKey

func (*StrStoreKey) Name

func (ssk *StrStoreKey) Name() string

func (*StrStoreKey) Prefix

func (ssk *StrStoreKey) Prefix() string

Jump to

Keyboard shortcuts

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