sync

package
v0.8.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2020 License: Apache-2.0 Imports: 13 Imported by: 1

Documentation

Index

Constants

View Source
const VolumeHeadName = "volume-head"

Variables

This section is empty.

Functions

func GetSnapshotsInfo

func GetSnapshotsInfo(replicas []*types.ControllerReplicaInfo) (outputDisks map[string]types.DiskInfo, err error)

Types

type BackupCreateInfo

type BackupCreateInfo struct {
	BackupID      string `json:"backupID"`
	IsIncremental bool   `json:"isIncremental"`
}

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"`
}

type ReplicaRebuildStatus

type ReplicaRebuildStatus struct {
	Error        string `json:"error"`
	IsRebuilding bool   `json:"isRebuilding"`
	Progress     int    `json:"progress"`
	State        string `json:"state"`
}

type RestoreStatus

type RestoreStatus struct {
	IsRestoring  bool   `json:"isRestoring"`
	LastRestored string `json:"lastRestored"`
	Progress     int    `json:"progress,omitempty"`
	Error        string `json:"error,omitempty"`
	Filename     string `json:"filename,omitempty"`
	State        string `json:"state"`
	BackupURL    string `json:"backupURL"`
}

type SnapshotPurgeStatus

type SnapshotPurgeStatus struct {
	Error     string `json:"error"`
	IsPurging bool   `json:"isPurging"`
	Progress  int    `json:"progress"`
	State     string `json:"state"`
}

type Task

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

func NewTask

func NewTask(controller string) *Task

func (*Task) AddReplica

func (t *Task) AddReplica(replica string) error

func (*Task) CreateBackup

func (t *Task) CreateBackup(snapshot, dest string, labels []string, credential map[string]string) (*BackupCreateInfo, error)

func (*Task) DeleteSnapshot

func (t *Task) DeleteSnapshot(snapshot string) error

func (*Task) FetchBackupStatus

func (t *Task) FetchBackupStatus(backupID string, replicaIP string) (*BackupStatusInfo, error)

func (*Task) PurgeSnapshotStatus

func (t *Task) PurgeSnapshotStatus() (map[string]*SnapshotPurgeStatus, error)

func (*Task) PurgeSnapshots

func (t *Task) PurgeSnapshots(skip bool) error

func (*Task) RebuildStatus

func (t *Task) RebuildStatus() (map[string]*ReplicaRebuildStatus, error)

func (*Task) Reset

func (t *Task) Reset() error

func (*Task) RestoreBackup

func (t *Task) RestoreBackup(backup string, credential map[string]string) error

func (*Task) RestoreBackupIncrementally

func (t *Task) RestoreBackupIncrementally(backup, backupName, lastRestored string, credential map[string]string) error

func (*Task) RestoreStatus

func (t *Task) RestoreStatus() (map[string]*RestoreStatus, error)

func (*Task) StartWithReplicas

func (t *Task) StartWithReplicas(replicas []string) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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