types

package
v0.4.3 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2023 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
	GetAtHeight(key []byte, height uint64) []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(cacheSize int) interface{}
	SetHeight(h int64)
	BeginWrite()
	EndWrite()
	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)
}

Jump to

Keyboard shortcuts

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