checksum

package
v0.0.0-...-a345a4b Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2024 License: Apache-2.0, Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxScanCntLimit = 1024 // limited by grpc message size
)

Variables

This section is empty.

Functions

func Run

func Run(ctx context.Context, cmdName string,
	executor *Executor, method StorageChecksumMethod, expect rawkv.RawChecksum) error

func UpdateChecksum

func UpdateChecksum(c *rawkv.RawChecksum, crc64Xor, totalKvs, totalBytes uint64)

Types

type Client

type Client interface {
	Checksum(ctx context.Context, startKey, endKey []byte, options ...rawkv.RawOption) (check rawkv.RawChecksum, err error)
	Scan(ctx context.Context, startKey, endKey []byte, limit int, options ...rawkv.RawOption) (keys [][]byte, values [][]byte, err error)
	Close() error
}

type Executor

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

ExecutorBuilder is used to build

func NewExecutor

func NewExecutor(ctx context.Context, keyRanges []*utils.KeyRange, pdAddrs []string, apiVersion kvrpcpb.APIVersion,
	concurrency uint, tls utils.TLSConfig) (*Executor, error)

NewExecutorBuilder returns a new executor builder.

func (*Executor) Close

func (exec *Executor) Close()

func (*Executor) Execute

func (exec *Executor) Execute(
	ctx context.Context,
	expect rawkv.RawChecksum,
	method StorageChecksumMethod,
	progressCallBack func(backup.ProgressUnit),
) error

Execute executes a checksum executor.

type StorageChecksumMethod

type StorageChecksumMethod int32
const (
	StorageChecksumCommand StorageChecksumMethod = 0
	StorageScanCommand     StorageChecksumMethod = 1
)

Jump to

Keyboard shortcuts

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