Documentation
¶
Index ¶
- type AWSSnapshotter
- func (s *AWSSnapshotter) GetVolumeID(pv *corev1.PersistentVolume) (string, error)
- func (s *AWSSnapshotter) Init(deps *controller.Dependencies, conf map[string]string) error
- func (s *AWSSnapshotter) PrepareBackupMetadata(b *v1alpha1.Backup, tc *v1alpha1.TidbCluster) (string, error)
- func (s *AWSSnapshotter) PrepareRestoreMetadata(r *v1alpha1.Restore) (string, error)
- func (s *AWSSnapshotter) SetVolumeID(pv *corev1.PersistentVolume, volumeID string) error
- type BaseSnapshotter
- type CloudSnapBackup
- type Component
- type GCPSnapshotter
- func (s *GCPSnapshotter) GetVolumeID(pv *corev1.PersistentVolume) (string, error)
- func (s *GCPSnapshotter) Init(deps *controller.Dependencies, conf map[string]string) error
- func (s *GCPSnapshotter) PrepareBackupMetadata(b *v1alpha1.Backup, tc *v1alpha1.TidbCluster) (string, error)
- func (s *GCPSnapshotter) PrepareRestoreMetadata(r *v1alpha1.Restore) (string, error)
- func (s *GCPSnapshotter) SetVolumeID(pv *corev1.PersistentVolume, volumeID string) error
- type KubernetesBackup
- type NoneSnapshotter
- func (s *NoneSnapshotter) GetVolumeID(pv *corev1.PersistentVolume) (string, error)
- func (s *NoneSnapshotter) Init(deps *controller.Dependencies, conf map[string]string) error
- func (s *NoneSnapshotter) PrepareBackupMetadata(b *v1alpha1.Backup, tc *v1alpha1.TidbCluster) (string, error)
- func (s *NoneSnapshotter) PrepareRestoreMetadata(r *v1alpha1.Restore) (string, error)
- func (s *NoneSnapshotter) SetVolumeID(pv *corev1.PersistentVolume, volumeID string) error
- type Snapshotter
- type StoresBackup
- type StoresMixture
- type TiKVBackup
- type VolumeBackup
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AWSSnapshotter ¶
type AWSSnapshotter struct {
BaseSnapshotter
}
The snapshotter for creating snapshots from volumes (during a backup) and volumes from snapshots (during a restore) on AWS EBS.
func (*AWSSnapshotter) GetVolumeID ¶
func (s *AWSSnapshotter) GetVolumeID(pv *corev1.PersistentVolume) (string, error)
func (*AWSSnapshotter) Init ¶
func (s *AWSSnapshotter) Init(deps *controller.Dependencies, conf map[string]string) error
func (*AWSSnapshotter) PrepareBackupMetadata ¶
func (s *AWSSnapshotter) PrepareBackupMetadata(b *v1alpha1.Backup, tc *v1alpha1.TidbCluster) (string, error)
func (*AWSSnapshotter) PrepareRestoreMetadata ¶
func (s *AWSSnapshotter) PrepareRestoreMetadata(r *v1alpha1.Restore) (string, error)
func (*AWSSnapshotter) SetVolumeID ¶
func (s *AWSSnapshotter) SetVolumeID(pv *corev1.PersistentVolume, volumeID string) error
type BaseSnapshotter ¶
type BaseSnapshotter struct {
// contains filtered or unexported fields
}
func (*BaseSnapshotter) Init ¶
func (s *BaseSnapshotter) Init(deps *controller.Dependencies, conf map[string]string) error
func (*BaseSnapshotter) PrepareCSBK8SMeta ¶
func (s *BaseSnapshotter) PrepareCSBK8SMeta(csb *CloudSnapBackup, tc *v1alpha1.TidbCluster) ([]*corev1.Pod, string, error)
type CloudSnapBackup ¶
type CloudSnapBackup struct {
TiKV *TiKVBackup `json:"tikv"`
PD Component `json:"pd"`
TiDB Component `json:"tidb"`
Kubernetes *KubernetesBackup `json:"kubernetes"`
Options map[string]interface{} `json:"options"`
}
func NewCloudSnapshotBackup ¶
func NewCloudSnapshotBackup(tc *v1alpha1.TidbCluster) (csb *CloudSnapBackup)
type GCPSnapshotter ¶
type GCPSnapshotter struct {
BaseSnapshotter
}
The GCPSnapshotter for creating snapshots from volumes (during a backup) and volumes from snapshots (during a restore) on Google Compute Engine Disks.
func (*GCPSnapshotter) GetVolumeID ¶
func (s *GCPSnapshotter) GetVolumeID(pv *corev1.PersistentVolume) (string, error)
func (*GCPSnapshotter) Init ¶
func (s *GCPSnapshotter) Init(deps *controller.Dependencies, conf map[string]string) error
func (*GCPSnapshotter) PrepareBackupMetadata ¶
func (s *GCPSnapshotter) PrepareBackupMetadata(b *v1alpha1.Backup, tc *v1alpha1.TidbCluster) (string, error)
func (*GCPSnapshotter) PrepareRestoreMetadata ¶
func (s *GCPSnapshotter) PrepareRestoreMetadata(r *v1alpha1.Restore) (string, error)
func (*GCPSnapshotter) SetVolumeID ¶
func (s *GCPSnapshotter) SetVolumeID(pv *corev1.PersistentVolume, volumeID string) error
type KubernetesBackup ¶
type KubernetesBackup struct {
PVCs []*corev1.PersistentVolumeClaim `json:"pvcs"`
PVs []*corev1.PersistentVolume `json:"pvs"`
TiDBCluster *v1alpha1.TidbCluster `json:"crd_tidb_cluster"`
Unstructured *unstructured.Unstructured `json:"options"`
}
type NoneSnapshotter ¶
type NoneSnapshotter struct {
}
func (*NoneSnapshotter) GetVolumeID ¶
func (s *NoneSnapshotter) GetVolumeID(pv *corev1.PersistentVolume) (string, error)
func (*NoneSnapshotter) Init ¶
func (s *NoneSnapshotter) Init(deps *controller.Dependencies, conf map[string]string) error
func (*NoneSnapshotter) PrepareBackupMetadata ¶
func (s *NoneSnapshotter) PrepareBackupMetadata(b *v1alpha1.Backup, tc *v1alpha1.TidbCluster) (string, error)
func (*NoneSnapshotter) PrepareRestoreMetadata ¶
func (s *NoneSnapshotter) PrepareRestoreMetadata(r *v1alpha1.Restore) (string, error)
func (*NoneSnapshotter) SetVolumeID ¶
func (s *NoneSnapshotter) SetVolumeID(pv *corev1.PersistentVolume, volumeID string) error
type Snapshotter ¶
type Snapshotter interface {
// Init prepares the Snapshotter for usage, it would add
// specific parameters as config map[string]string in the future.
Init(deps *controller.Dependencies, conf map[string]string) error
// GetVolumeID returns the cloud provider specific identifier
// for the PersistentVolume-PV.
GetVolumeID(pv *corev1.PersistentVolume) (string, error)
// PrepareBackupMetadata performs the preparations for creating
// a snapshot from the used volume for PV/PVC.
PrepareBackupMetadata(b *v1alpha1.Backup, tc *v1alpha1.TidbCluster) (string, error)
// PrepareRestoreMetadata performs the preparations for creating
// a volume from the snapshot that has been backed up.
PrepareRestoreMetadata(r *v1alpha1.Restore) (string, error)
// SetVolumeID sets the cloud provider specific identifier
// for the PersistentVolume-PV.
SetVolumeID(pv *corev1.PersistentVolume, volumeID string) error
}
func NewSnapshotterForBackup ¶
func NewSnapshotterForBackup(m v1alpha1.BackupMode, d *controller.Dependencies) (Snapshotter, string, error)
func NewSnapshotterForRestore ¶
func NewSnapshotterForRestore(m v1alpha1.RestoreMode, d *controller.Dependencies) (Snapshotter, string, error)
type StoresBackup ¶
type StoresBackup struct {
StoreID uint64 `json:"store_id"`
Volumes []*VolumeBackup `json:"volumes"`
}
type StoresMixture ¶
type StoresMixture struct {
// contains filtered or unexported fields
}
func NewBackupStoresMixture ¶
func NewBackupStoresMixture( tc *v1alpha1.TidbCluster, pvcs []*corev1.PersistentVolumeClaim, pvs []*corev1.PersistentVolume, s Snapshotter) *StoresMixture
func NewRestoreStoresMixture ¶
func NewRestoreStoresMixture(s Snapshotter) *StoresMixture
func (*StoresMixture) PrepareCSBStoresMeta ¶
func (m *StoresMixture) PrepareCSBStoresMeta(csb *CloudSnapBackup, pods []*corev1.Pod) (string, error)
func (*StoresMixture) ProcessCSBPVCsAndPVs ¶
func (m *StoresMixture) ProcessCSBPVCsAndPVs(r *v1alpha1.Restore, csb *CloudSnapBackup) (string, error)
func (*StoresMixture) SetPod ¶
func (m *StoresMixture) SetPod(pod *corev1.Pod)
type TiKVBackup ¶
type TiKVBackup struct {
Component
Stores []*StoresBackup `json:"stores"`
}
Click to show internal directories.
Click to hide internal directories.