storage

package
v0.0.0-...-c8e9c26 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2018 License: LGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CloneCache

type CloneCache struct {
	Memory Memory
	Store  common.StateStore
}

func NewCloneCache

func NewCloneCache(store common.StateStore) *CloneCache

func (*CloneCache) Add

func (cloneCache *CloneCache) Add(prefix common.DataEntryPrefix, key []byte, value states.StateValue)

func (*CloneCache) Commit

func (cloneCache *CloneCache) Commit()

func (*CloneCache) Delete

func (cloneCache *CloneCache) Delete(prefix common.DataEntryPrefix, key []byte)

func (*CloneCache) Get

func (cloneCache *CloneCache) Get(prefix common.DataEntryPrefix, key []byte) (states.StateValue, error)

func (*CloneCache) GetOrAdd

func (cloneCache *CloneCache) GetOrAdd(prefix common.DataEntryPrefix, key []byte, value states.StateValue) (states.StateValue, error)

type Memory

type Memory map[string]*StateItem

type StateItem

type StateItem struct {
	Prefix common.DataEntryPrefix
	Key    string
	Value  states.StateValue
	State  common.ItemState
}

Jump to

Keyboard shortcuts

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