Documentation ¶
Overview ¶
Copyright 2024 PingCAP, Inc. Licensed under Apache-2.0.
Index ¶
- Constants
- func ParseImportThreadsFromConfig(resp []byte) (uint, error)
- func ParseLogBackupEnableFromConfig(resp []byte) (bool, error)
- func ParseMergeRegionSizeFromConfig(resp []byte) (uint64, uint64, error)
- type ClusterInfo
- type ConfigTerm
- type EBSBasedBRMeta
- func (c *EBSBasedBRMeta) CheckClusterInfo()
- func (c *EBSBasedBRMeta) ConfigFromFile(path string) error
- func (c *EBSBasedBRMeta) GetFullBackupType() string
- func (c *EBSBasedBRMeta) GetResolvedTS() uint64
- func (c *EBSBasedBRMeta) GetStoreCount() uint64
- func (c *EBSBasedBRMeta) GetTiKVVolumeCount() uint64
- func (c *EBSBasedBRMeta) SetClusterVersion(version string)
- func (c *EBSBasedBRMeta) SetFullBackupType(t string)
- func (c *EBSBasedBRMeta) SetResolvedTS(id uint64)
- func (c *EBSBasedBRMeta) SetRestoreVolumeIDs(idMap map[string]string)
- func (c *EBSBasedBRMeta) SetSnapshotIDs(idMap map[string]string)
- func (c *EBSBasedBRMeta) SetVolumeAZs(idMap map[string]string)
- func (c *EBSBasedBRMeta) String() string
- type EBSStore
- type EBSVolume
- type EBSVolumeType
- type KVConfig
- type Kubernetes
- type PDComponent
- type TiDBComponent
- type TiKVComponent
Constants ¶
View Source
const ( GP3Volume EBSVolumeType = "gp3" IO1Volume = "io1" IO2Volume = "io2" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ClusterInfo ¶
type ClusterInfo struct { Version string `json:"cluster_version" toml:"cluster_version"` FullBackupType string `json:"full_backup_type" toml:"full_backup_type"` ResolvedTS uint64 `json:"resolved_ts" toml:"resolved_ts"` Replicas map[string]uint64 `json:"replicas" toml:"replicas"` }
ClusterInfo represents the tidb cluster level meta infos. such as pd cluster id/alloc id, cluster resolved ts and tikv configuration.
type ConfigTerm ¶
type EBSBasedBRMeta ¶
type EBSBasedBRMeta struct { ClusterInfo *ClusterInfo `json:"cluster_info" toml:"cluster_info"` TiKVComponent *TiKVComponent `json:"tikv" toml:"tikv"` TiDBComponent *TiDBComponent `json:"tidb" toml:"tidb"` PDComponent *PDComponent `json:"pd" toml:"pd"` KubernetesMeta *Kubernetes `json:"kubernetes" toml:"kubernetes"` Options map[string]any `json:"options" toml:"options"` Region string `json:"region" toml:"region"` }
func NewMetaFromStorage ¶
func NewMetaFromStorage(ctx context.Context, s storage.ExternalStorage) (*EBSBasedBRMeta, error)
func (*EBSBasedBRMeta) CheckClusterInfo ¶
func (c *EBSBasedBRMeta) CheckClusterInfo()
func (*EBSBasedBRMeta) ConfigFromFile ¶
func (c *EBSBasedBRMeta) ConfigFromFile(path string) error
ConfigFromFile loads config from file.
func (*EBSBasedBRMeta) GetFullBackupType ¶
func (c *EBSBasedBRMeta) GetFullBackupType() string
func (*EBSBasedBRMeta) GetResolvedTS ¶
func (c *EBSBasedBRMeta) GetResolvedTS() uint64
func (*EBSBasedBRMeta) GetStoreCount ¶
func (c *EBSBasedBRMeta) GetStoreCount() uint64
func (*EBSBasedBRMeta) GetTiKVVolumeCount ¶
func (c *EBSBasedBRMeta) GetTiKVVolumeCount() uint64
func (*EBSBasedBRMeta) SetClusterVersion ¶
func (c *EBSBasedBRMeta) SetClusterVersion(version string)
func (*EBSBasedBRMeta) SetFullBackupType ¶
func (c *EBSBasedBRMeta) SetFullBackupType(t string)
func (*EBSBasedBRMeta) SetResolvedTS ¶
func (c *EBSBasedBRMeta) SetResolvedTS(id uint64)
func (*EBSBasedBRMeta) SetRestoreVolumeIDs ¶
func (c *EBSBasedBRMeta) SetRestoreVolumeIDs(idMap map[string]string)
func (*EBSBasedBRMeta) SetSnapshotIDs ¶
func (c *EBSBasedBRMeta) SetSnapshotIDs(idMap map[string]string)
func (*EBSBasedBRMeta) SetVolumeAZs ¶
func (c *EBSBasedBRMeta) SetVolumeAZs(idMap map[string]string)
func (*EBSBasedBRMeta) String ¶
func (c *EBSBasedBRMeta) String() string
type EBSVolume ¶
type EBSVolume struct { ID string `json:"volume_id" toml:"volume_id"` Type string `json:"type" toml:"type"` SnapshotID string `json:"snapshot_id" toml:"snapshot_id"` RestoreVolumeId string `json:"restore_volume_id" toml:"restore_volume_id"` VolumeAZ string `json:"volume_az" toml:"volume_az"` Status string `json:"status" toml:"status"` }
EBSVolume is passed by TiDB deployment tools: TiDB Operator and TiUP(in future) we should do snapshot inside BR, because we need some logic to determine the order of snapshot starts. TODO finish the info with TiDB Operator developer.
type EBSVolumeType ¶
type EBSVolumeType string
func (EBSVolumeType) Valid ¶
func (t EBSVolumeType) Valid() bool
type KVConfig ¶
type KVConfig struct { ImportGoroutines ConfigTerm[uint] MergeRegionSize ConfigTerm[uint64] MergeRegionKeyCount ConfigTerm[uint64] }
type Kubernetes ¶
type Kubernetes struct { PVs []*corev1.PersistentVolume `json:"pvs" toml:"pvs"` PVCs []*corev1.PersistentVolumeClaim `json:"pvcs" toml:"pvcs"` CRD any `json:"crd_tidb_cluster" toml:"crd_tidb_cluster"` Options map[string]any `json:"options" toml:"options"` }
type PDComponent ¶
type PDComponent struct {
Replicas int `json:"replicas"`
}
type TiDBComponent ¶
type TiDBComponent struct {
Replicas int `json:"replicas"`
}
type TiKVComponent ¶
Click to show internal directories.
Click to hide internal directories.