storage

package
v1.14.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: May 27, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDefaultBackupStorageLocations added in v1.13.0

func GetDefaultBackupStorageLocations(ctx context.Context, kbClient client.Client, namespace string) (*velerov1api.BackupStorageLocationList, error)

func IsReadyToValidate

func IsReadyToValidate(bslValidationFrequency *metav1.Duration, lastValidationTime *metav1.Time, serverValidationFrequency time.Duration, log logrus.FieldLogger) bool

IsReadyToValidate calculates if a given backup storage location is ready to be validated.

Rules: Users can choose a validation frequency per location. This will override the server's default value To skip/stop validation, set the frequency to zero This will always return "true" for the first attempt at validating a location, regardless of its validation frequency setting Otherwise, it returns "ready" only when NOW is equal to or after the next validation time (next validation time: last validation time + validation frequency)

func ListBackupStorageLocations

func ListBackupStorageLocations(ctx context.Context, kbClient client.Client, namespace string) (velerov1api.BackupStorageLocationList, error)

ListBackupStorageLocations verifies if there are any backup storage locations. For all purposes, if either there is an error while attempting to fetch items or if there are no items an error would be returned since the functioning of the system would be haulted.

Types

type DefaultBackupLocationInfo

type DefaultBackupLocationInfo struct {
	// StorageLocation is the name of the backup storage location designated as the default on the server side.
	// Deprecated TODO(2.0)
	StorageLocation string
	// ServerValidationFrequency is the server default validation frequency for all backup storage locations
	ServerValidationFrequency time.Duration
}

DefaultBackupLocationInfo holds server default backup storage location information

Jump to

Keyboard shortcuts

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