Documentation ¶
Index ¶
- func GetDefaultBackupStorageLocations(ctx context.Context, kbClient client.Client, namespace string) (*velerov1api.BackupStorageLocationList, error)
- func IsReadyToValidate(bslValidationFrequency *metav1.Duration, lastValidationTime *metav1.Time, ...) bool
- func ListBackupStorageLocations(ctx context.Context, kbClient client.Client, namespace string) (velerov1api.BackupStorageLocationList, error)
- type DefaultBackupLocationInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetDefaultBackupStorageLocations ¶
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