store

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2021 License: MIT Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Close

func Close(db DB) error

Types

type DB

type DB interface {
	Close() error
	Get(key []byte) ([]byte, error)
	GetWithTxn(key []byte, txn1 interface{}) ([]byte, error)
	GetWithSnapshot(key []byte, ss interface{}) ([]byte, error)
	GetNewestSnapshot() (interface{}, error)
	GetSnapshotFromTxn(txn interface{}) interface{}
	GetWithVersion(key []byte, version uint64) ([]byte, error)
	MGet(key [][]byte) (map[string][]byte, error)
	MGetWithVersion(key [][]byte, version uint64) (map[string][]byte, error)
	MGetWithSnapshot(keys [][]byte, ss interface{}) (map[string][]byte, error)
	MGetWithTxn(keys [][]byte, txn1 interface{}) (map[string][]byte, error)
	Set(key []byte, value []byte) error
	SetWithTxn(key []byte, value []byte, txn interface{}) error
	MSet(kv map[string][]byte) (int, error)
	MSetWithTxn(kvm map[string][]byte, txn interface{}) (int, error)
	Delete(keys [][]byte) (int, error)
	DeleteWithTxn(keys [][]byte, txn interface{}) (int, error)
	BatchInTxn(f func(txn interface{}) (interface{}, error)) (interface{}, error)
	GetRangeKeysWithFrontier(start []byte, withstart bool, end []byte, withend bool, offset, limit uint64, snapshot interface{}) ([][]byte, error)
	GetRangeKeysWithFrontierWithTxn(start []byte, withstart bool, end []byte, withend bool, offset, limit uint64, txn interface{}) ([][]byte, error)
	GetRangeKeys(start []byte, end []byte, offset, limit uint64, snapshot interface{}) ([][]byte, error)
	GetRangeKeysWithTxn(start []byte, end []byte, offset, limit uint64, txn interface{}) ([][]byte, error)
	GetRangeKeysCount(start []byte, withstart bool, end []byte, withend bool, limit uint64, snapshot interface{}) (uint64, error)
	GetRangeKeysCountWithTxn(start []byte, withstart bool, end []byte, withend bool, limit uint64, txn interface{}) (uint64, error)
	GetRangeVals(start []byte, end []byte, limit uint64, snapshot interface{}) ([][]byte, error)
	GetRangeValsWithTxn(start []byte, end []byte, limit uint64, txn1 interface{}) ([][]byte, error)
	GetRangeKeysVals(start []byte, end []byte, limit uint64, snapshot interface{}) ([][]byte, error)
	GetRangeKeysValsWithTxn(start []byte, end []byte, limit uint64, txn1 interface{}) ([][]byte, error)
	DeleteRange(start []byte, end []byte, limit uint64) (uint64, error)
	DeleteRangeWithTxn(start []byte, end []byte, limit uint64, txn1 interface{}) (uint64, error)
	GetRank(start, end, obj []byte, snapshot interface{}) (int64, bool, error)
	GetRankWithTxn(start, end, obj []byte, txn interface{}) (int64, bool, error)

	BatchWithTxn(f func(txn interface{}) (interface{}, error), txn1 interface{}) (interface{}, error)
	NewTxn() (interface{}, error)

	UnsafeDeleteRange(start, end []byte) error
	RunGC(safePoint uint64, concurrency int) error
	GetCurrentVersion() (uint64, error)
}

backend db interface

func Open

func Open(conf *config.Config) (DB, error)

type Iterator

type Iterator interface {
	Valid() bool
	Key() []byte
	Value() []byte
	Next() error
	Close()
}

iterator for backend store

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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