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 CoprRPCHandler ¶
type CoprRPCHandler = mocktikv.CoprRPCHandler
CoprRPCHandler is the interface to handle coprocessor RPC commands.
type ErrLocked ¶
ErrLocked is returned when trying to Read/Write on a locked key. Client should backoff or cleanup the lock then retry.
type MockClient ¶
MockClient sends kv RPC calls to mock cluster.
Click to show internal directories.
Click to hide internal directories.