sync

package
v1.6.1 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2024 License: Apache-2.0 Imports: 15 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CloneSnapshot added in v1.2.0

func CloneSnapshot(engineControllerClient, fromControllerClient *client.ControllerClient, volumeName, fromVolumeName,
	snapshotFileName string, exportBackingImageIfExist bool, fileSyncHTTPClientTimeout int) error

func CloneStatus added in v1.2.0

func CloneStatus(engineControllerClient *client.ControllerClient, volumeName string) (map[string]*SnapshotCloneStatus,
	error)

func GetSnapshotsInfo

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

Types

type BackupCreateInfo

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

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

type ReplicaError struct {
	Address string
	Message string
}

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 ReplicaRebuildStatus struct {
	Error              string `json:"error"`
	IsRebuilding       bool   `json:"isRebuilding"`
	Progress           int    `json:"progress"`
	State              string `json:"state"`
	FromReplicaAddress string `json:"fromReplicaAddress"`
}

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 SnapshotCloneStatus struct {
	IsCloning          bool   `json:"isCloning"`
	Error              string `json:"error"`
	Progress           int    `json:"progress"`
	State              string `json:"state"`
	FromReplicaAddress string `json:"fromReplicaAddress"`
	SnapshotName       string `json:"snapshotName"`
}

type SnapshotHashStatus added in v1.4.0

type SnapshotHashStatus struct {
	State             string `json:"state"`
	Checksum          string `json:"checksum"`
	Error             string `json:"error"`
	SilentlyCorrupted bool   `json:"silentlyCorrupted"`
}

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(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 (t *Task) AddReplica(volumeSize, volumeCurrentSize int64, address, instanceName string, fileSyncHTTPClientTimeout int, fastSync bool) error

func (*Task) AddRestoreReplica added in v1.1.0

func (t *Task) AddRestoreReplica(volumeSize, volumeCurrentSize int64, address, instanceName string) error

func (*Task) CreateBackup

func (t *Task) CreateBackup(backupName, snapshot, dest, backingImageName, backingImageChecksum string,
	compressionMethod string, concurrentLimit int, storageClassName string, labels []string, credential map[string]string) (*BackupCreateInfo, error)

func (*Task) DeleteSnapshot

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

func (*Task) HashSnapshot added in v1.4.0

func (t *Task) HashSnapshot(snapshotName string, rehash bool) error

func (*Task) HashSnapshotCancel added in v1.4.0

func (t *Task) HashSnapshotCancel(snapshotName string) error

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 (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, concurrentLimit int) error

func (*Task) RestoreStatus

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

func (*Task) StartWithReplicas

func (t *Task) StartWithReplicas(volumeSize, volumeCurrentSize int64, replicas []string) error

func (*Task) VerifyRebuildReplica added in v1.1.0

func (t *Task) VerifyRebuildReplica(address, instanceName string) error

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)

func (*TaskError) Error added in v1.0.1

func (e *TaskError) Error() string

func (*TaskError) HasError added in v1.0.1

func (e *TaskError) HasError() bool

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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