testutils

package
v2.0.7 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2023 License: Apache-2.0 Imports: 3 Imported by: 22

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BootstrapWithMultiRegions = mocktikv.BootstrapWithMultiRegions

BootstrapWithMultiRegions initializes a Cluster with multiple Regions and 1 Store. The number of Regions will be len(splitKeys) + 1.

View Source
var BootstrapWithMultiStores = mocktikv.BootstrapWithMultiStores

BootstrapWithMultiStores initializes a Cluster with 1 Region and n Stores.

View Source
var BootstrapWithSingleStore = mocktikv.BootstrapWithSingleStore

BootstrapWithSingleStore initializes a Cluster with 1 Region and 1 Store.

Functions

func NewMockTiKV

func NewMockTiKV(path string, coprHandler CoprRPCHandler) (*MockClient, *MockCluster, pd.Client, error)

NewMockTiKV creates a TiKV client and PD client from options.

Types

type Cluster

type Cluster = cluster.Cluster

Cluster simulates a TiKV cluster.

type CoprRPCHandler

type CoprRPCHandler = mocktikv.CoprRPCHandler

CoprRPCHandler is the interface to handle coprocessor RPC commands.

type ErrLocked

type ErrLocked = mocktikv.ErrLocked

ErrLocked is returned when trying to Read/Write on a locked key. Client should backoff or cleanup the lock then retry.

type MVCCPair

type MVCCPair = mocktikv.Pair

MVCCPair is a KV pair read from MvccStore or an error if any occurs.

type MVCCStore

type MVCCStore = mocktikv.MVCCStore

MVCCStore is a mvcc key-value storage.

type MockClient

type MockClient = mocktikv.RPCClient

MockClient sends kv RPC calls to mock cluster.

type MockCluster

type MockCluster = mocktikv.Cluster

MockCluster simulates a TiKV cluster.

type RPCSession

type RPCSession = mocktikv.Session

RPCSession stores session scope rpc data.

Jump to

Keyboard shortcuts

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