velero

package
v0.0.0-...-a622235 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2024 License: Apache-2.0 Imports: 11 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BackupBuilder

type BackupBuilder struct {
	// Backup definition, used to create the backup object.
	Definition *velerov1.Backup
	// Created backup object.
	Object *velerov1.Backup
	// contains filtered or unexported fields
}

BackupBuilder provides a struct for backup object from the cluster and a backup definition.

func NewBackupBuilder

func NewBackupBuilder(apiClient *clients.Settings, name, nsname string) *BackupBuilder

NewBackupBuilder creates a new instance of BackupBuilder.

func PullBackup

func PullBackup(apiClient *clients.Settings, name, nsname string) (*BackupBuilder, error)

PullBackup loads an existing backup into BackupBuilder struct.

func (*BackupBuilder) Create

func (builder *BackupBuilder) Create() (*BackupBuilder, error)

Create makes a backup according to the backup definition and stores the created object in the backup builder.

func (*BackupBuilder) Delete

func (builder *BackupBuilder) Delete() (*BackupBuilder, error)

Delete removes the backup object and resets the builder object.

func (*BackupBuilder) Exists

func (builder *BackupBuilder) Exists() bool

Exists checks whether the given backup exists.

func (*BackupBuilder) Get

func (builder *BackupBuilder) Get() (*velerov1.Backup, error)

Get returns Backup object if found.

func (*BackupBuilder) Update

func (builder *BackupBuilder) Update() (*BackupBuilder, error)

Update renovates the existing backup object with the backup definition in builder.

func (*BackupBuilder) WithExcludedClusterScopedResource

func (builder *BackupBuilder) WithExcludedClusterScopedResource(crd string) *BackupBuilder

WithExcludedClusterScopedResource adds the specified cluster-scoped crd for exclusion when performing a backup.

func (*BackupBuilder) WithExcludedNamespaceScopedResources

func (builder *BackupBuilder) WithExcludedNamespaceScopedResources(crd string) *BackupBuilder

WithExcludedNamespaceScopedResources adds the specified namespace-scoped crd for exclusion when performing a backup.

func (*BackupBuilder) WithIncludedClusterScopedResource

func (builder *BackupBuilder) WithIncludedClusterScopedResource(crd string) *BackupBuilder

WithIncludedClusterScopedResource adds the specified cluster-scoped crd for inclusion when performing a backup.

func (*BackupBuilder) WithIncludedNamespace

func (builder *BackupBuilder) WithIncludedNamespace(namespace string) *BackupBuilder

WithIncludedNamespace adds the specified namespace for inclusion when performing a backup.

func (*BackupBuilder) WithIncludedNamespaceScopedResource

func (builder *BackupBuilder) WithIncludedNamespaceScopedResource(crd string) *BackupBuilder

WithIncludedNamespaceScopedResource adds the specified namespace-scoped crd for inclusion when performing a backup.

func (*BackupBuilder) WithStorageLocation

func (builder *BackupBuilder) WithStorageLocation(location string) *BackupBuilder

WithStorageLocation adds a storage location to the backup.

type BackupStorageLocationBuilder

type BackupStorageLocationBuilder struct {
	// BackupStorageLocation definition, used to create the backupstoragelocation object.
	Definition *velerov1.BackupStorageLocation
	// Created backupstoragelocation object.
	Object *velerov1.BackupStorageLocation
	// contains filtered or unexported fields
}

BackupStorageLocationBuilder provides a struct for backupstoragelocation object from the cluster and a backupstoragelocation definition.

func ListBackupStorageLocationBuilder

func ListBackupStorageLocationBuilder(
	apiClient *clients.Settings, nsname string, options ...client.ListOptions) ([]*BackupStorageLocationBuilder, error)

ListBackupStorageLocationBuilder returns backupstoragelocation inventory in the given namespace.

func NewBackupStorageLocationBuilder

func NewBackupStorageLocationBuilder(
	apiClient *clients.Settings,
	name string,
	namespace string,
	provider string,
	objectStorage velerov1.ObjectStorageLocation) *BackupStorageLocationBuilder

NewBackupStorageLocationBuilder creates a new instance of BackupStorageLocationBuilder.

func PullBackupStorageLocationBuilder

func PullBackupStorageLocationBuilder(
	apiClient *clients.Settings, name, namespace string) (*BackupStorageLocationBuilder, error)

PullBackupStorageLocationBuilder pulls existing backupstoragelocation from cluster.

func (*BackupStorageLocationBuilder) Create

Create makes a backupstoragelocation according to the backupstoragelocation definition and stores the created object in the backupstoragelocation builder.

func (*BackupStorageLocationBuilder) Delete

func (builder *BackupStorageLocationBuilder) Delete() error

Delete removes the backupstoragelocation object and resets the builder object.

func (*BackupStorageLocationBuilder) Exists

func (builder *BackupStorageLocationBuilder) Exists() bool

Exists checks whether the given backupstoragelocation exists.

func (*BackupStorageLocationBuilder) Get

Get returns Backup object if found.

func (*BackupStorageLocationBuilder) Update

Update renovates the existing backupstoragelocation object with the backupstoragelocation definition in builder.

func (*BackupStorageLocationBuilder) WaitUntilAvailable

func (builder *BackupStorageLocationBuilder) WaitUntilAvailable(
	timeout time.Duration) (*BackupStorageLocationBuilder, error)

WaitUntilAvailable waits the specified timeout for the backupstoragelocation to become available.

func (*BackupStorageLocationBuilder) WaitUntilUnavailable

func (builder *BackupStorageLocationBuilder) WaitUntilUnavailable(
	timeout time.Duration) (*BackupStorageLocationBuilder, error)

WaitUntilUnavailable waits the specified timeout for the backupstoragelocation to become unavailable.

func (*BackupStorageLocationBuilder) WithConfig

WithConfig includes the provided configuration to the backupstoragelocation.

type RestoreBuilder

type RestoreBuilder struct {
	// Restore definition, used to create the restore object.
	Definition *velerov1.Restore
	// Created restore object.
	Object *velerov1.Restore
	// contains filtered or unexported fields
}

RestoreBuilder provides a struct for restore object from the cluster and a restore definition.

func NewRestoreBuilder

func NewRestoreBuilder(apiClient *clients.Settings, name, nsname, backupName string) *RestoreBuilder

NewRestoreBuilder creates a new instance of RestoreBuilder.

func PullRestore

func PullRestore(apiClient *clients.Settings, name, nsname string) (*RestoreBuilder, error)

PullRestore loads an existing restore into RestoreBuilder struct.

func (*RestoreBuilder) Create

func (builder *RestoreBuilder) Create() (*RestoreBuilder, error)

Create makes a restore according to the restore definition and stores the created object in the restore builder.

func (*RestoreBuilder) Delete

func (builder *RestoreBuilder) Delete() (*RestoreBuilder, error)

Delete removes the restore object and resets the builder object.

func (*RestoreBuilder) Exists

func (builder *RestoreBuilder) Exists() bool

Exists checks whether the given restore object exists.

func (*RestoreBuilder) Get

func (builder *RestoreBuilder) Get() (*velerov1.Restore, error)

Get returns Backup object if found.

func (*RestoreBuilder) Update

func (builder *RestoreBuilder) Update() (*RestoreBuilder, error)

Update renovates the existing restore object with the restore definition in builder.

func (*RestoreBuilder) WithStorageLocation

func (builder *RestoreBuilder) WithStorageLocation(location string) *RestoreBuilder

WithStorageLocation adds a storage location to the restore.

Jump to

Keyboard shortcuts

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