Documentation ¶
Overview ¶
Design for copy data from source PVC to destination PVC, continuously push statue into status channel for notifications
Index ¶
- Constants
- type DataCopyManager
- func (dcm *DataCopyManager) DeregisterRelatedJob(jobName string)
- func (dcm *DataCopyManager) RegisterRelatedJob(jobName string, resultCh chan *DataCopyStatus)
- func (dcm *DataCopyManager) Run()
- func (dcm *DataCopyManager) UseRclone(rcloneImage, rcloneConfigMapName, rcloneKeyConfigMapName, ... string) *Rclone
- type DataCopyStatus
- type Progress
- type Rclone
- func (rcl *Rclone) EnsureRcloneConfigMapToTargetNamespace(targetNamespace string) error
- func (rcl *Rclone) GenerateRcloneKeyConfigMap(ns string) *corev1.ConfigMap
- func (rcl *Rclone) SrcMountPointToRemoteMountPoint(jobName, namespace, lvPoolName, lvName, srcNodeName, dstNodeName string, ...) error
- func (rcl *Rclone) WaitMigrateJobTaskDone(jobName, lvName string, waitUntilSuccess bool, timeout time.Duration) error
Constants ¶
View Source
const ( RcloneSrcName = "source" RcloneRemoteName = "remote" )
View Source
const ( DataCopyStatusPending = "pending" DataCopyStatusSuccess = "success" DataCopyStatusRunning = "running" DataCopyStatusFailed = "failed" )
View Source
const (
DefaultCopyTimeout = time.Hour * 48
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DataCopyManager ¶
type DataCopyManager struct {
// contains filtered or unexported fields
}
func NewDataCopyManager ¶
func NewDataCopyManager(ctx context.Context, dataCopyJobStatusAnnotationName string, client k8sclient.Client, statusCh chan *DataCopyStatus) (*DataCopyManager, error)
NewDataCopyManager return DataCopyManager instance
It will feedback copy process status continuously through statusCh, so it dose not need ResourceReady to poll resource status
func (*DataCopyManager) DeregisterRelatedJob ¶
func (dcm *DataCopyManager) DeregisterRelatedJob(jobName string)
func (*DataCopyManager) RegisterRelatedJob ¶
func (dcm *DataCopyManager) RegisterRelatedJob(jobName string, resultCh chan *DataCopyStatus)
func (*DataCopyManager) Run ¶
func (dcm *DataCopyManager) Run()
func (*DataCopyManager) UseRclone ¶
func (dcm *DataCopyManager) UseRclone( rcloneImage, rcloneConfigMapName, rcloneKeyConfigMapName, rcloneConfigMapNamespace, rcloneConfigMapKey, rcloneCrtKey string) *Rclone
type DataCopyStatus ¶
type Rclone ¶
type Rclone struct {
// contains filtered or unexported fields
}
func (*Rclone) EnsureRcloneConfigMapToTargetNamespace ¶
func (*Rclone) GenerateRcloneKeyConfigMap ¶ added in v0.4.0
func (*Rclone) SrcMountPointToRemoteMountPoint ¶
Click to show internal directories.
Click to hide internal directories.