Update exported function details with source code comments.
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
This commit is contained in:
@@ -214,7 +214,7 @@ type VolumeSnapshotSource struct {
|
||||
CSI *CSIVolumeSnapshotSource `json:"csiVolumeSnapshotSource,omitempty"`
|
||||
}
|
||||
|
||||
// Represents the source from CSI volume snapshot
|
||||
// CSIVolumeSnapshotSource represents the source from CSI volume snapshot
|
||||
type CSIVolumeSnapshotSource struct {
|
||||
// Driver is the name of the driver to use for this snapshot.
|
||||
// This MUST be the same name returned by the CSI GetPluginName() call for
|
||||
|
@@ -72,6 +72,7 @@ var (
|
||||
_ CSIConnection = &csiConnection{}
|
||||
)
|
||||
|
||||
// New returns a CSI connection object.
|
||||
func New(address string, timeout time.Duration) (CSIConnection, error) {
|
||||
conn, err := connect(address, timeout)
|
||||
if err != nil {
|
||||
|
@@ -42,6 +42,7 @@ type csiHandler struct {
|
||||
snapshotNameUUIDLength int
|
||||
}
|
||||
|
||||
// NewCSIHandler returns a handler which includes the csi connection and Snapshot name details
|
||||
func NewCSIHandler(
|
||||
csiConnection connection.CSIConnection,
|
||||
timeout time.Duration,
|
||||
|
@@ -440,6 +440,7 @@ func getSnapshotStatusForLogging(snapshot *crdv1.VolumeSnapshot) string {
|
||||
return fmt.Sprintf("bound to: %q, Completed: %v", snapshot.Spec.SnapshotContentName, snapshot.Status.ReadyToUse)
|
||||
}
|
||||
|
||||
// IsSnapshotBound returns true/false if snapshot is bound
|
||||
func IsSnapshotBound(snapshot *crdv1.VolumeSnapshot, content *crdv1.VolumeSnapshotContent) bool {
|
||||
if content.Spec.VolumeSnapshotRef != nil && content.Spec.VolumeSnapshotRef.Name == snapshot.Name &&
|
||||
content.Spec.VolumeSnapshotRef.UID == snapshot.UID {
|
||||
|
@@ -320,7 +320,7 @@ func getCredentials(k8s kubernetes.Interface, ref *v1.SecretReference) (map[stri
|
||||
return credentials, nil
|
||||
}
|
||||
|
||||
// Returns 0 for resyncPeriod in case resyncing is not needed.
|
||||
// NoResyncPeriodFunc Returns 0 for resyncPeriod in case resyncing is not needed.
|
||||
func NoResyncPeriodFunc() time.Duration {
|
||||
return 0
|
||||
}
|
||||
|
Reference in New Issue
Block a user