kvrpc

package
v2.0.0-...-5317c89 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2022 License: Apache-2.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 Batch

type Batch struct {
	RegionID locate.RegionVerID
	Keys     [][]byte
	Values   [][]byte
	TTLs     []uint64
}

Batch is part of the mutation set that will be sent to tikv in a request.

func AppendBatches

func AppendBatches(batches []Batch, regionID locate.RegionVerID, groupKeys [][]byte, keyToValue map[string][]byte, keyToTTL map[string]uint64, limit int) []Batch

AppendBatches divides the mutation to be requested into Batches so that the size of each batch is approximately the same as the given limit.

func AppendKeyBatches

func AppendKeyBatches(batches []Batch, regionID locate.RegionVerID, groupKeys [][]byte, limit int) []Batch

AppendKeyBatches divides the mutation to be requested into Batches, ensuring that the count of keys of each Batch is not greater than the given limit.

type BatchResult

type BatchResult struct {
	*tikvrpc.Response
	Error error
}

BatchResult wraps a Batch request's server response or an error.

Jump to

Keyboard shortcuts

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