redis

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: 14 Imported by: 0

Documentation

Index

Constants

View Source
const DebugLevel = 101

Variables

This section is empty.

Functions

func NewDB

func NewDB(sourceAddr string, auth string) (*kv.DB, error)

Types

type RVVS

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

func NewVersionedValues

func NewVersionedValues(cli *redis.Client, discardedTimestampBits int) *RVVS

func (*RVVS) Close

func (vvs *RVVS) Close() error

func (RVVS) Floor

func (vvs RVVS) Floor(_ context.Context, key string, upperVersion uint64) (types.DBValue, uint64, error)

func (RVVS) Get

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

func (RVVS) GetTxnRecord

func (vvs RVVS) GetTxnRecord(ctx context.Context, version uint64) (types.DBValue, error)

func (RVVS) Insert

func (vvs RVVS) Insert(key string, version uint64, val types.DBValue) error

func (RVVS) Max

func (vvs RVVS) Max(_ context.Context, key string) (types.DBValue, uint64, error)

func (RVVS) Min

func (vvs RVVS) Min(_ context.Context, key string) (types.DBValue, uint64, error)

func (RVVS) ReadModifyWriteKey

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

func (RVVS) Remove

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

func (RVVS) RemoveIf

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

func (RVVS) RemoveTxnRecord

func (vvs RVVS) RemoveTxnRecord(ctx context.Context, version uint64) error

func (RVVS) UpdateFlag

func (vvs RVVS) UpdateFlag(_ context.Context, key string, version uint64, newFlag uint8) error

func (RVVS) Upsert

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

func (RVVS) UpsertTxnRecord

func (vvs RVVS) UpsertTxnRecord(ctx context.Context, version uint64, val types.DBValue) error

Jump to

Keyboard shortcuts

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