restore

package
v2.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 5, 2025 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TiKVConfigEncryptionMethod      = "security.encryption.data-encryption-method"
	TiKVConfigEncryptionMasterKeyId = "security.encryption.master-key.key-id"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type FakeRestoreManager

type FakeRestoreManager struct {
	// contains filtered or unexported fields
}

func NewFakeRestoreManager

func NewFakeRestoreManager() *FakeRestoreManager

func (*FakeRestoreManager) SetSyncError

func (frm *FakeRestoreManager) SetSyncError(err error)

func (*FakeRestoreManager) Sync

func (*FakeRestoreManager) UpdateCondition

func (frm *FakeRestoreManager) UpdateCondition(_ context.Context, _ *v1alpha1.Restore, _ *metav1.Condition) error

type RestoreConditionUpdaterInterface

type RestoreConditionUpdaterInterface interface {
	Update(ctx context.Context, restore *v1alpha1.Restore, condition *metav1.Condition, newStatus *RestoreUpdateStatus) error
}

RestoreConditionUpdaterInterface enables updating Restore conditions.

func NewRealRestoreConditionUpdater

func NewRealRestoreConditionUpdater(
	cli client.Client,
	recorder record.EventRecorder) RestoreConditionUpdaterInterface

NewRealRestoreConditionUpdater returns a RestoreConditionUpdaterInterface that updates the Status of a Restore,

type RestoreManager

type RestoreManager interface {
	// Sync	implements the logic for syncing Restore.
	Sync(ctx context.Context, restore *v1alpha1.Restore) error
	// UpdateCondition updates the condition for a Restore.
	UpdateCondition(ctx context.Context, restore *v1alpha1.Restore, condition *metav1.Condition) error
}

RestoreManager implements the logic for manage restore.

func NewRestoreManager

func NewRestoreManager(cli client.Client, eventRecorder record.EventRecorder, backupManagerImage string) RestoreManager

NewRestoreManager return restoreManager

type RestoreUpdateStatus

type RestoreUpdateStatus struct {
	// TimeStarted is the time at which the restore was started.
	TimeStarted *metav1.Time
	// TimeCompleted is the time at which the restore was completed.
	TimeCompleted *metav1.Time
	// CommitTs is the snapshot time point of tidb cluster.
	CommitTs *string
	// ProgressStep the step name of progress.
	ProgressStep *string
	// Progress is the step's progress value.
	Progress *int
	// ProgressUpdateTime is the progress update time.
	ProgressUpdateTime *metav1.Time
}

RestoreUpdateStatus represents the status of a restore to be updated. This structure should keep synced with the fields in `RestoreStatus` except for `Phase` and `Conditions`.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL