Documentation ¶
Index ¶
- Constants
- func GetAllTiKVStoresWithRetry(ctx context.Context, pdClient pd.Client, storeBehavior util.StoreBehavior) ([]*metapb.Store, error)
- type Mgr
- func (mgr *Mgr) Close()
- func (mgr *Mgr) GetBackupClient(ctx context.Context, storeID uint64) (backuppb.BackupClient, error)
- func (mgr *Mgr) GetConfigFromTiKV(ctx context.Context, cli *http.Client, fn func(*http.Response) error) error
- func (mgr *Mgr) GetDomain() *domain.Domain
- func (mgr *Mgr) GetLockResolver() *txnlock.LockResolver
- func (mgr *Mgr) GetLogBackupClient(ctx context.Context, storeID uint64) (logbackup.LogBackupClient, error)
- func (mgr *Mgr) GetMergeRegionSizeAndCount(ctx context.Context, client *http.Client) (uint64, uint64)
- func (mgr *Mgr) GetStorage() kv.Storage
- func (mgr *Mgr) GetTLSConfig() *tls.Config
- func (mgr *Mgr) GetTS(ctx context.Context) (uint64, error)
- type VersionCheckerType
Constants ¶
View Source
const ( // DefaultMergeRegionSizeBytes is the default region split size, 96MB. // See https://github.com/tikv/tikv/blob/v4.0.8/components/raftstore/src/coprocessor/config.rs#L35-L38 DefaultMergeRegionSizeBytes uint64 = 96 * units.MiB // DefaultMergeRegionKeyCount is the default region key count, 960000. DefaultMergeRegionKeyCount uint64 = 960000 )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Mgr ¶
type Mgr struct { *pdutil.PdController *utils.StoreManager // contains filtered or unexported fields }
Mgr manages connections to a TiDB cluster.
func NewMgr ¶
func NewMgr( ctx context.Context, g glue.Glue, pdAddrs string, tlsConf *tls.Config, securityOption pd.SecurityOption, keepalive keepalive.ClientParameters, storeBehavior util.StoreBehavior, checkRequirements bool, needDomain bool, versionCheckerType VersionCheckerType, ) (*Mgr, error)
NewMgr creates a new Mgr.
Domain is optional for Backup, set `needDomain` to false to disable initializing Domain.
func (*Mgr) GetBackupClient ¶
GetBackupClient get or create a backup client.
func (*Mgr) GetConfigFromTiKV ¶
func (mgr *Mgr) GetConfigFromTiKV(ctx context.Context, cli *http.Client, fn func(*http.Response) error) error
GetConfigFromTiKV get configs from all alive tikv stores.
func (*Mgr) GetLockResolver ¶
func (mgr *Mgr) GetLockResolver() *txnlock.LockResolver
GetLockResolver gets the LockResolver.
func (*Mgr) GetLogBackupClient ¶
func (*Mgr) GetMergeRegionSizeAndCount ¶
func (mgr *Mgr) GetMergeRegionSizeAndCount(ctx context.Context, client *http.Client) (uint64, uint64)
GetMergeRegionSizeAndCount returns the tikv config `coprocessor.region-split-size` and `coprocessor.region-split-key`. returns the default config when failed.
func (*Mgr) GetTLSConfig ¶
GetTLSConfig returns the tls config.
type VersionCheckerType ¶
type VersionCheckerType int
const ( // default version checker NormalVersionChecker VersionCheckerType = iota // version checker for PiTR StreamVersionChecker )
Click to show internal directories.
Click to hide internal directories.