Versions in this module Expand all Collapse all v1 v1.0.0 Apr 12, 2021 Changes in this version + type CachedRegion struct + type CodecPDClient struct + func (c *CodecPDClient) GetPrevRegion(ctx context.Context, key []byte) (*pd.Region, error) + func (c *CodecPDClient) GetRegion(ctx context.Context, key []byte) (*pd.Region, error) + func (c *CodecPDClient) GetRegionByID(ctx context.Context, regionID uint64) (*pd.Region, error) + type KeyLocation struct + EndKey []byte + Region RegionVerID + StartKey []byte + func (l *KeyLocation) Contains(key []byte) bool + type RPCContext struct + Addr string + Meta *metapb.Region + Peer *metapb.Peer + Region RegionVerID + func (c *RPCContext) GetStoreID() uint64 + type Region struct + func (r *Region) Contains(key []byte) bool + func (r *Region) EndKey() []byte + func (r *Region) GetContext() *kvrpcpb.Context + func (r *Region) GetID() uint64 + func (r *Region) StartKey() []byte + func (r *Region) SwitchPeer(storeID uint64) bool + func (r *Region) VerID() RegionVerID + type RegionCache struct + func NewRegionCache(pdClient pd.Client, conf *config.RegionCache) *RegionCache + func (c *RegionCache) ClearStoreByID(id uint64) + func (c *RegionCache) DropRegion(id RegionVerID) + func (c *RegionCache) DropStoreOnSendRequestFail(ctx *RPCContext, err error) + func (c *RegionCache) GetRPCContext(bo *retry.Backoffer, id RegionVerID) (*RPCContext, error) + func (c *RegionCache) GetStoreAddr(bo *retry.Backoffer, id uint64) (string, error) + func (c *RegionCache) GroupKeysByRegion(bo *retry.Backoffer, keys [][]byte) (map[RegionVerID][][]byte, RegionVerID, error) + func (c *RegionCache) ListRegionIDsInKeyRange(bo *retry.Backoffer, startKey, endKey []byte) (regionIDs []uint64, err error) + func (c *RegionCache) LocateKey(bo *retry.Backoffer, key []byte) (*KeyLocation, error) + func (c *RegionCache) LocateRegionByID(bo *retry.Backoffer, regionID uint64) (*KeyLocation, error) + func (c *RegionCache) OnRegionStale(ctx *RPCContext, newRegions []*metapb.Region) error + func (c *RegionCache) PDClient() pd.Client + func (c *RegionCache) ReloadStoreAddr(bo *retry.Backoffer, id uint64) (string, error) + func (c *RegionCache) UpdateLeader(regionID RegionVerID, leaderStoreID uint64) + type RegionVerID struct + func (r *RegionVerID) GetID() uint64 + type Store struct + Addr string + ID uint64 Other modules containing this package github.com/tikv/client-go/v2