Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CmdType ¶
type CmdType uint16
CmdType represents the concrete request type in Request or response type in Response.
const ( CmdGet CmdType = 1 + iota CmdScan CmdPrewrite CmdCommit CmdCleanup CmdBatchGet CmdBatchRollback CmdScanLock CmdResolveLock CmdGC CmdDeleteRange CmdRawGet CmdType = 256 + iota CmdRawPut CmdRawDelete CmdRawScan CmdCop CmdType = 512 + iota CmdCopStream CmdMvccGetByKey CmdType = 1024 + iota CmdMvccGetByStartTs CmdSplitRegion )
CmdType values.
type CopStreamResponse ¶
type CopStreamResponse struct {
tikvpb.Tikv_CoprocessorStreamClient
*coprocessor.Response // The first result of Recv()
}
CopStreamResponse combinates tikvpb.Tikv_CoprocessorStreamClient and the first Recv() result together. In streaming API, get grpc stream client may not involve any network packet, then region error have to be handled in Recv() function. This struct facilitates the error handling.
type Request ¶
type Request struct {
kvrpcpb.Context
Type CmdType
Get *kvrpcpb.GetRequest
Scan *kvrpcpb.ScanRequest
Prewrite *kvrpcpb.PrewriteRequest
Commit *kvrpcpb.CommitRequest
Cleanup *kvrpcpb.CleanupRequest
BatchGet *kvrpcpb.BatchGetRequest
BatchRollback *kvrpcpb.BatchRollbackRequest
ScanLock *kvrpcpb.ScanLockRequest
ResolveLock *kvrpcpb.ResolveLockRequest
GC *kvrpcpb.GCRequest
DeleteRange *kvrpcpb.DeleteRangeRequest
RawGet *kvrpcpb.RawGetRequest
RawPut *kvrpcpb.RawPutRequest
RawDelete *kvrpcpb.RawDeleteRequest
RawScan *kvrpcpb.RawScanRequest
Cop *coprocessor.Request
MvccGetByKey *kvrpcpb.MvccGetByKeyRequest
MvccGetByStartTs *kvrpcpb.MvccGetByStartTsRequest
SplitRegion *kvrpcpb.SplitRegionRequest
}
Request wraps all kv/coprocessor requests.
type Response ¶
type Response struct {
Type CmdType
Get *kvrpcpb.GetResponse
Scan *kvrpcpb.ScanResponse
Prewrite *kvrpcpb.PrewriteResponse
Commit *kvrpcpb.CommitResponse
Cleanup *kvrpcpb.CleanupResponse
BatchGet *kvrpcpb.BatchGetResponse
BatchRollback *kvrpcpb.BatchRollbackResponse
ScanLock *kvrpcpb.ScanLockResponse
ResolveLock *kvrpcpb.ResolveLockResponse
GC *kvrpcpb.GCResponse
DeleteRange *kvrpcpb.DeleteRangeResponse
RawGet *kvrpcpb.RawGetResponse
RawPut *kvrpcpb.RawPutResponse
RawDelete *kvrpcpb.RawDeleteResponse
RawScan *kvrpcpb.RawScanResponse
Cop *coprocessor.Response
CopStream *CopStreamResponse
MvccGetByKey *kvrpcpb.MvccGetByKeyResponse
MvccGetByStartTS *kvrpcpb.MvccGetByStartTsResponse
SplitRegion *kvrpcpb.SplitRegionResponse
}
Response wraps all kv/coprocessor responses.
func GenRegionErrorResp ¶
GenRegionErrorResp returns corresponding Response with specified RegionError according to the given req.
Click to show internal directories.
Click to hide internal directories.