kv

package
v0.0.0-...-e4e1abe Latest Latest
Warning

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

Go to latest
Published: May 28, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TblPrefixRows           = 0x00
	TblPrefixLastCheckpoint = 0x01
)

Variables

View Source
var TableMapper = map[byte]string{}
View Source
var TblPrefixName = map[byte]string{
	TblPrefixRows:           "rows",
	TblPrefixLastCheckpoint: "checkpoint",
}

Functions

This section is empty.

Types

type KVStore

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

func NewStore

func NewStore(dsnString string) (*KVStore, error)

func (*KVStore) Close

func (s *KVStore) Close() error

func (*KVStore) DeleteShardsCheckpoint

func (s *KVStore) DeleteShardsCheckpoint(ctx context.Context, keyPrefix []byte) error

func (*KVStore) FetchLastWrittenCheckpoint

func (s *KVStore) FetchLastWrittenCheckpoint(ctx context.Context, key []byte) (out []byte, err error)

func (*KVStore) FetchSingletEntry

func (s *KVStore) FetchSingletEntry(ctx context.Context, keyStart, keyEnd []byte) (key []byte, value []byte, err error)

func (*KVStore) FetchTabletRow

func (s *KVStore) FetchTabletRow(ctx context.Context, key []byte) (value []byte, err error)

func (*KVStore) FetchTabletRows

func (s *KVStore) FetchTabletRows(ctx context.Context, keys [][]byte, onKeyValue store.OnKeyValue) error

func (*KVStore) HasTabletRow

func (s *KVStore) HasTabletRow(ctx context.Context, keyStart, keyEnd []byte) (exists bool, err error)

func (*KVStore) NewBatch

func (s *KVStore) NewBatch(logger *zap.Logger) store.Batch

func (*KVStore) ScanIndexKeys

func (s *KVStore) ScanIndexKeys(ctx context.Context, prefix []byte, onKey store.OnKey) error

func (*KVStore) ScanLastShardsWrittenCheckpoint

func (s *KVStore) ScanLastShardsWrittenCheckpoint(ctx context.Context, keyPrefix []byte, onKeyValue store.OnKeyValue) error

func (*KVStore) ScanTabletRows

func (s *KVStore) ScanTabletRows(ctx context.Context, keyStart, keyEnd []byte, onKeyValue store.OnKeyValue) error

type Key

type Key = store.Key

Jump to

Keyboard shortcuts

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