stateStorage

package
v0.0.0-...-5fa8bf8 Latest Latest
Warning

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

Go to latest
Published: May 18, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LevelDB

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

func NewLevelDB

func NewLevelDB(path string) (*LevelDB, error)

func (*LevelDB) BatchPut

func (db *LevelDB) BatchPut(kvs [][2][]byte) error

func (*LevelDB) Close

func (db *LevelDB) Close() error

func (*LevelDB) Delete

func (db *LevelDB) Delete(key []byte) error

func (*LevelDB) Get

func (db *LevelDB) Get(key []byte) ([]byte, error)

func (*LevelDB) Has

func (db *LevelDB) Has(key []byte) bool

func (*LevelDB) Put

func (db *LevelDB) Put(key, value []byte) error

type MemKVStore

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

func NewMemKVStore

func NewMemKVStore() *MemKVStore

func (*MemKVStore) BatchPut

func (kv *MemKVStore) BatchPut(kvs [][2][]byte) error

func (*MemKVStore) Close

func (kv *MemKVStore) Close() error

func (*MemKVStore) Delete

func (kv *MemKVStore) Delete(key []byte) error

func (*MemKVStore) Get

func (kv *MemKVStore) Get(key []byte) ([]byte, error)

func (*MemKVStore) Has

func (kv *MemKVStore) Has(key []byte) bool

func (*MemKVStore) Put

func (kv *MemKVStore) Put(key, value []byte) error

type StateStorage

type StateStorage interface {
	Get([]byte) ([]byte, error)
	Put([]byte, []byte) error
	Has([]byte) bool
	Delete([]byte) error
	BatchPut([][2][]byte) error
	Close() error
}

StateStorage 针对状态树的持久化存储

Jump to

Keyboard shortcuts

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