kvdb

package
v1.68.4 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2023 License: BSD-3-Clause Imports: 7 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DisableLog

func DisableLog()

DisableLog disable log output

func New

func New(cfg *types.Store, sub []byte, chain33cfg *types.Chain33Config) queue.Module

New KVStore module

func SetLogLevel

func SetLogLevel(level string)

SetLogLevel set log level

Types

type KVStore

type KVStore struct {
	*drivers.BaseStore
	// contains filtered or unexported fields
}

KVStore implementation

func (*KVStore) Close

func (kvs *KVStore) Close()

Close KVStore module

func (*KVStore) Commit

func (kvs *KVStore) Commit(req *types.ReqHash) ([]byte, error)

Commit kvs in the mem of KVStore

func (*KVStore) CommitUpgrade

func (kvs *KVStore) CommitUpgrade(req *types.ReqHash) ([]byte, error)

CommitUpgrade kvs in the mem of KVStore

func (*KVStore) Del

func (kvs *KVStore) Del(req *types.StoreDel) ([]byte, error)

Del set kvs to nil with StateHash

func (*KVStore) Get

func (kvs *KVStore) Get(datas *types.StoreGet) [][]byte

Get kvs with statehash from KVStore

func (*KVStore) IterateRangeByStateHash

func (kvs *KVStore) IterateRangeByStateHash(statehash []byte, start []byte, end []byte, ascending bool, fn func(key, value []byte) bool)

IterateRangeByStateHash method

func (*KVStore) MemSet

func (kvs *KVStore) MemSet(datas *types.StoreSet, sync bool) ([]byte, error)

MemSet set kvs to the mem of KVStore

func (*KVStore) MemSetUpgrade

func (kvs *KVStore) MemSetUpgrade(datas *types.StoreSet, sync bool) ([]byte, error)

MemSetUpgrade set kvs to the mem of KVStore

func (*KVStore) ProcEvent

func (kvs *KVStore) ProcEvent(msg *queue.Message)

ProcEvent handles supported events

func (*KVStore) Rollback

func (kvs *KVStore) Rollback(req *types.ReqHash) ([]byte, error)

Rollback kvs in the mem of KVStore

func (*KVStore) Set

func (kvs *KVStore) Set(datas *types.StoreSet, sync bool) ([]byte, error)

Set kvs with statehash to KVStore

Jump to

Keyboard shortcuts

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