statedb

package
v0.0.0-...-24d451d Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type StateDB

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

func New

func New(sdbName string, maxSnapshotCount int) *StateDB

func (*StateDB) Close

func (s *StateDB) Close()

func (*StateDB) Get

func (s *StateDB) Get(key string) []byte

func (*StateDB) NewCommittableTransaction

func (s *StateDB) NewCommittableTransaction() *Transaction

func (*StateDB) NewRollbackTransaction

func (s *StateDB) NewRollbackTransaction() *Transaction

func (*StateDB) Rollback

func (s *StateDB) Rollback(rollbackTransactions int)

type Transaction

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

func (*Transaction) BatchSet

func (t *Transaction) BatchSet(data map[string][]byte)

func (*Transaction) Commit

func (t *Transaction) Commit()

func (*Transaction) Get

func (t *Transaction) Get(key string) []byte

func (*Transaction) GetBuffer

func (t *Transaction) GetBuffer() []byte

func (*Transaction) ID

func (t *Transaction) ID() int64

func (*Transaction) NewTx

func (t *Transaction) NewTx() *Tx

func (*Transaction) Rollback

func (t *Transaction) Rollback()

func (*Transaction) Set

func (t *Transaction) Set(key string, value []byte)

type Tx

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

func (*Tx) BatchSet

func (t *Tx) BatchSet(data map[string][]byte)

func (*Tx) Commit

func (t *Tx) Commit() ([]byte, map[string][]byte)

func (*Tx) Get

func (t *Tx) Get(key string) []byte

func (*Tx) ID

func (t *Tx) ID() int64

func (*Tx) Rollback

func (t *Tx) Rollback()

func (*Tx) Set

func (t *Tx) Set(key string, value []byte)

Jump to

Keyboard shortcuts

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