MCPcopy Index your code
hub / github.com/cloudnative-pg/cloudnative-pg / SetAsStarted

Method SetAsStarted

api/v1/backup_funcs.go:74–84  ·  view source on GitHub ↗

SetAsStarted marks a certain backup as started

(podName, containerID, sessionID string, method BackupMethod)

Source from the content-addressed store, hash-verified

72
73// SetAsStarted marks a certain backup as started
74func (backupStatus *BackupStatus) SetAsStarted(podName, containerID, sessionID string, method BackupMethod) {
75 backupStatus.Phase = BackupPhaseStarted
76 backupStatus.Error = ""
77 backupStatus.InstanceID = &InstanceID{
78 PodName: podName,
79 ContainerID: containerID,
80 SessionID: sessionID,
81 }
82 backupStatus.Method = method
83 backupStatus.ReconciliationStartedAt = ptr.To(metav1.Now())
84}
85
86// SetSnapshotElements sets the Snapshots field from a list of VolumeSnapshot
87func (snapshotStatus *BackupSnapshotStatus) SetSnapshotElements(snapshots []volumesnapshotv1.VolumeSnapshot) {

Callers 3

Calls

no outgoing calls

Tested by

no test coverage detected