memory

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2021 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMemoryDB

func NewMemoryDB() *kv.DB

Types

type KeyVersionedValues

type KeyVersionedValues concurrency.ConcurrentTreeMap

func (*KeyVersionedValues) Floor

func (kvvs *KeyVersionedValues) Floor(upperVersion uint64) (val types.DBValue, version uint64, err error)

func (*KeyVersionedValues) Get

func (kvvs *KeyVersionedValues) Get(version uint64) (types.DBValue, error)

func (*KeyVersionedValues) Insert

func (kvvs *KeyVersionedValues) Insert(version uint64, val types.DBValue) error

func (*KeyVersionedValues) Max

func (kvvs *KeyVersionedValues) Max() (types.DBValue, error)

func (*KeyVersionedValues) Min

func (kvvs *KeyVersionedValues) Min() (types.DBValue, error)

func (*KeyVersionedValues) ReadModifyWrite

func (kvvs *KeyVersionedValues) ReadModifyWrite(version uint64, modifyFlag func(types.DBValue) types.DBValue, onNotExists func(error) error) error

func (*KeyVersionedValues) Remove

func (kvvs *KeyVersionedValues) Remove(version uint64) error

func (*KeyVersionedValues) RemoveIf

func (kvvs *KeyVersionedValues) RemoveIf(version uint64, pred func(prev types.DBValue) error) error

func (*KeyVersionedValues) Upsert

func (kvvs *KeyVersionedValues) Upsert(version uint64, val types.DBValue) error

type TxnRecordStore

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

func NewTxnRecordStore

func NewTxnRecordStore() *TxnRecordStore

func (*TxnRecordStore) Close

func (ts *TxnRecordStore) Close() error

func (*TxnRecordStore) GetTxnRecord

func (ts *TxnRecordStore) GetTxnRecord(_ context.Context, version uint64) (types.DBValue, error)

func (*TxnRecordStore) RemoveTxnRecord

func (ts *TxnRecordStore) RemoveTxnRecord(_ context.Context, version uint64) error

func (*TxnRecordStore) UpsertTxnRecord

func (ts *TxnRecordStore) UpsertTxnRecord(_ context.Context, version uint64, val types.DBValue) error

type VersionedValues

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

func NewVersionedValues

func NewVersionedValues() *VersionedValues

func (*VersionedValues) Close

func (vvs *VersionedValues) Close() error

func (*VersionedValues) Floor

func (vvs *VersionedValues) Floor(_ context.Context, key string, upperVersion uint64) (val types.DBValue, version uint64, err error)

func (*VersionedValues) Get

func (vvs *VersionedValues) Get(_ context.Context, key string, version uint64) (types.DBValue, error)

func (*VersionedValues) ReadModifyWriteKey

func (vvs *VersionedValues) ReadModifyWriteKey(_ context.Context, key string, version uint64, modifyFlag func(val types.DBValue) types.DBValue, onNotExists func(err error) error) error

func (*VersionedValues) Remove

func (vvs *VersionedValues) Remove(_ context.Context, key string, version uint64) error

func (*VersionedValues) RemoveIf

func (vvs *VersionedValues) RemoveIf(_ context.Context, key string, version uint64, pred func(prev types.DBValue) error) error

func (*VersionedValues) UpdateFlag

func (vvs *VersionedValues) UpdateFlag(context.Context, string, uint64, uint8) error

func (*VersionedValues) Upsert

func (vvs *VersionedValues) Upsert(_ context.Context, key string, version uint64, val types.DBValue) error

Jump to

Keyboard shortcuts

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