package
2.0.7
Repository: https://github.com/tikv/client-go.git
Documentation: pkg.go.dev

# Packages

No description provided by the author

# Functions

BytesToString converts the memory consumption to a readable string.
CompatibleParseGCTime parses a string with `GCTimeFormat` and returns a time.Time.
ContextWithTraceExecDetails returns a context with trace-exec-details enabled.
EnableFailpoints enables use of failpoints.
EncodeToString overrides hex.EncodeToString implementation.
EvalFailpoint injects code for testing.
FormatBytes uses to format bytes, this function will prune precision before format bytes.
FormatDuration uses to format duration, this function will prune precision before format duration.
HexRegionKey converts region key to hex format.
HexRegionKeyStr converts region key to hex format.
IsInternalRequest returns the type of the request source.
IsRequestSourceInternal checks whether the input request source type is internal type.
NewRateLimit creates a limit controller with capacity n.
NewRURuntimeStats creates a new RURuntimeStats.
NewTiKVExecDetails creates a TiKVExecDetails from a kvproto ExecDetailsV2.
RequestSourceFromCtx extract source from passed context.
ResourceGroupNameFromCtx extract resource group name from passed context, empty string is returned is the key is not set.
SetSessionID sets session id into context.
String converts slice of bytes to string without copy.
ToUpperASCIIInplace bytes.ToUpper but zero-cost.
TraceExecDetailsEnabled checks whether trace-exec-details enabled.
WithInternalSourceType create context with internal source.
WithRecovery wraps goroutine startup call with force recovery.
WithResouceGroupName return a copy of the given context with a associated reosurce group name.

# Constants

ExternalRequest is the scope of external queries.
GCTimeFormat is the format that gc_worker used to store times.
InternalRequest is the scope of internal queries.
InternalTxnGC is the type of GC txn.
InternalTxnMeta is the type of the miscellaneous meta usage.
InternalTxnOthers is the type of requests that consume low resources.
SourceUnknown keeps same with the default value(empty string).

# Variables

CommitDetailCtxKey presents CommitDetail info key in context.
ExecDetailsKey presents ExecDetail info key in context.
LockKeysDetailCtxKey presents LockKeysDetail info key in context.
RequestSourceKey is used as the key of request source type in context.
RequestSourceTypeKey is used as the key of request source type in context.
SessionID is the context key type to mark a session.

# Structs

CommitDetails contains commit detail information.
ExecDetails contains execution detail info.
InterceptedPDClient is a PD's wrapper client to record stmt detail.
LockKeysDetails contains pessimistic lock keys detail information.
RateLimit wraps a fix sized channel to control concurrency.
ReqDetailInfo contains diagnose information about `TiKVExecDetails`, region, store and backoff.
RequestSource contains the source label of the request, used for tracking resource consuming.
RequestSourceKeyType is a dummy type to avoid naming collision in context.
RequestSourceTypeKeyType is a dummy type to avoid naming collision in context.
ResolveLockDetail contains the resolve lock detail information.
RURuntimeStats is the runtime stats collector for RU.
ScanDetail contains coprocessor scan detail information.
TiKVExecDetails is the detail execution information at TiKV side.
TimeDetail contains coprocessor time detail information.
TSSet is a set of timestamps.
WriteDetail contains the detailed time breakdown of a write operation.