Refactor snapshot error to utils.go

This commit is contained in:
Raunak Pradip Shah
2023-03-01 11:29:13 +05:30
parent 9ce31d0bf8
commit 69b054d1ed
33 changed files with 137 additions and 243 deletions

17
client/apis/utils.go Normal file
View File

@@ -0,0 +1,17 @@
package apis
import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
// VolumeSnapshotError describes an error encountered during snapshot creation.
type VolumeSnapshotError struct {
// time is the timestamp when the error was encountered.
// +optional
Time *metav1.Time `json:"time,omitempty" protobuf:"bytes,1,opt,name=time"`
// message is a string detailing the encountered error during snapshot
// creation if specified.
// NOTE: message may be logged, and it should not contain sensitive
// information.
// +optional
Message *string `json:"message,omitempty" protobuf:"bytes,2,opt,name=message"`
}