checksum

package
v4.0.10+incompatible Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2021 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Executor

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

Executor is a checksum executor.

func (*Executor) Each

func (exec *Executor) Each(f func(*kv.Request) error) error

Each executes the function to each requests in the executor.

func (*Executor) Execute

func (exec *Executor) Execute(
	ctx context.Context,
	client kv.Client,
	updateFn func(),
) (*tipb.ChecksumResponse, error)

Execute executes a checksum executor.

func (*Executor) Len

func (exec *Executor) Len() int

Len returns the total number of checksum requests.

func (*Executor) RawRequests

func (exec *Executor) RawRequests() ([]*tipb.ChecksumRequest, error)

RawRequests extracts the raw requests associated with this executor. This is mainly used for debugging only.

type ExecutorBuilder

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

ExecutorBuilder is used to build a "kv.Request".

func NewExecutorBuilder

func NewExecutorBuilder(table *model.TableInfo, ts uint64) *ExecutorBuilder

NewExecutorBuilder returns a new executor builder.

func (*ExecutorBuilder) Build

func (builder *ExecutorBuilder) Build() (*Executor, error)

Build builds a checksum executor.

func (*ExecutorBuilder) SetConcurrency

func (builder *ExecutorBuilder) SetConcurrency(conc uint) *ExecutorBuilder

SetConcurrency set the concurrency of the checksum executing.

func (*ExecutorBuilder) SetOldTable

func (builder *ExecutorBuilder) SetOldTable(oldTable *utils.Table) *ExecutorBuilder

SetOldTable set a old table info to the builder.

Jump to

Keyboard shortcuts

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