Documentation ¶
Index ¶
- func CloneSnapshot(engineControllerClient, fromControllerClient *client.ControllerClient, ...) error
- func CloneStatus(engineControllerClient *client.ControllerClient, volumeName string) (map[string]*SnapshotCloneStatus, error)
- func GetSnapshotsInfo(replicas []*types.ControllerReplicaInfo, volumeName string) (outputDisks map[string]types.DiskInfo, err error)
- type BackupCreateInfo
- type BackupStatusInfo
- type ReplicaError
- type ReplicaRebuildStatus
- type RestoreStatus
- type SnapshotCloneStatus
- type SnapshotHashStatus
- type SnapshotPurgeStatus
- type Task
- func (t *Task) AddReplica(volumeSize, volumeCurrentSize int64, address, instanceName string, ...) error
- func (t *Task) AddRestoreReplica(volumeSize, volumeCurrentSize int64, address, instanceName string) error
- func (t *Task) CreateBackup(backupName, snapshot, dest, backingImageName, backingImageChecksum string, ...) (*BackupCreateInfo, error)
- func (t *Task) DeleteSnapshot(snapshot string) error
- func (t *Task) HashSnapshot(snapshotName string, rehash bool) error
- func (t *Task) HashSnapshotCancel(snapshotName string) error
- func (t *Task) HashSnapshotStatus(snapshotName string) (map[string]*SnapshotHashStatus, error)
- func (t *Task) PurgeSnapshotStatus() (map[string]*SnapshotPurgeStatus, error)
- func (t *Task) PurgeSnapshots(skip bool) error
- func (t *Task) RebuildStatus() (map[string]*ReplicaRebuildStatus, error)
- func (t *Task) Reset() error
- func (t *Task) RestoreBackup(backup string, credential map[string]string, concurrentLimit int) error
- func (t *Task) RestoreStatus() (map[string]*RestoreStatus, error)
- func (t *Task) StartWithReplicas(volumeSize, volumeCurrentSize int64, replicas []string) error
- func (t *Task) VerifyRebuildReplica(address, instanceName string) error
- type TaskError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CloneSnapshot ¶ added in v1.2.0
func CloneStatus ¶ added in v1.2.0
func CloneStatus(engineControllerClient *client.ControllerClient, volumeName string) (map[string]*SnapshotCloneStatus, error)
func GetSnapshotsInfo ¶
Types ¶
type BackupCreateInfo ¶
type BackupStatusInfo ¶
type BackupStatusInfo struct { Progress int `json:"progress"` BackupURL string `json:"backupURL,omitempty"` Error string `json:"error,omitempty"` SnapshotName string `json:"snapshotName"` State string `json:"state"` ReplicaAddress string `json:"replicaAddress"` }
func FetchBackupStatus ¶ added in v1.1.3
func FetchBackupStatus(client *replicaClient.ReplicaClient, backupID string, replicaAddr string) (*BackupStatusInfo, error)
type ReplicaError ¶ added in v1.0.1
func NewReplicaError ¶ added in v1.0.1
func NewReplicaError(address string, err error) ReplicaError
func (ReplicaError) Error ¶ added in v1.0.1
func (e ReplicaError) Error() string
type ReplicaRebuildStatus ¶
type RestoreStatus ¶
type RestoreStatus struct { IsRestoring bool `json:"isRestoring"` Progress int `json:"progress,omitempty"` Error string `json:"error,omitempty"` Filename string `json:"filename,omitempty"` State string `json:"state"` BackupURL string `json:"backupURL"` LastRestored string `json:"lastRestored"` CurrentRestoringBackup string `json:"currentRestoringBackup"` }
type SnapshotCloneStatus ¶ added in v1.2.0
type SnapshotHashStatus ¶ added in v1.4.0
type SnapshotPurgeStatus ¶
type Task ¶
type Task struct {
// contains filtered or unexported fields
}
func NewTask ¶
func NewTask(ctx context.Context, controllerAddress, volumeName, controllerInstanceName string) (*Task, error)
NewTask creates new task with an initialized ControllerClient The lifetime of the Task::client is bound to the context lifetime client calls have their own contexts with timeouts for the call
func (*Task) AddReplica ¶
func (*Task) AddRestoreReplica ¶ added in v1.1.0
func (*Task) CreateBackup ¶
func (*Task) DeleteSnapshot ¶
func (*Task) HashSnapshot ¶ added in v1.4.0
func (*Task) HashSnapshotCancel ¶ added in v1.4.0
func (*Task) HashSnapshotStatus ¶ added in v1.4.0
func (t *Task) HashSnapshotStatus(snapshotName string) (map[string]*SnapshotHashStatus, error)
func (*Task) PurgeSnapshotStatus ¶
func (t *Task) PurgeSnapshotStatus() (map[string]*SnapshotPurgeStatus, error)
func (*Task) PurgeSnapshots ¶
func (*Task) RebuildStatus ¶
func (t *Task) RebuildStatus() (map[string]*ReplicaRebuildStatus, error)
func (*Task) RestoreBackup ¶
func (*Task) RestoreStatus ¶
func (t *Task) RestoreStatus() (map[string]*RestoreStatus, error)
func (*Task) StartWithReplicas ¶
func (*Task) VerifyRebuildReplica ¶ added in v1.1.0
type TaskError ¶ added in v1.0.1
type TaskError struct {
ReplicaErrors []ReplicaError
}
func NewTaskError ¶ added in v1.0.1
func NewTaskError(res ...ReplicaError) *TaskError
func (*TaskError) Append ¶ added in v1.0.1
func (e *TaskError) Append(re ReplicaError)
Click to show internal directories.
Click to hide internal directories.