types

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: May 29, 2021 License: Apache-2.0 Imports: 0 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseStoreI

type BaseStoreI interface {
	RLock()
	RUnlock()
	Get(key []byte) []byte
	PrepareForUpdate(key []byte)
	PrepareForDeletion(key []byte)
	Update(func(db SetDeleter))
	ActiveCount() int
}

type CacheStatus

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

type RootStoreI

type RootStoreI interface {
	BaseStoreI
	SetDeleter
	GetTrunkStore() interface{}
	SetHeight(h int64)
	BeginWrite()
	EndWrite()
	CheckConsistency()
	Close()
	Lock()
	Unlock()
}

type Serializable

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

type SetDeleter

type SetDeleter interface {
	Set(key, value []byte)
	Delete(key []byte)
}

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