Documentation ¶
Index ¶
Constants ¶
View Source
const ( // CRDGroupName represent the group of cnsvolumeinfo CRD. CRDGroupName = "cns.vmware.com" // FileVolumePrefix represents the prefix for RWX volume's volumeHandle. FileVolumePrefix = "file:" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type VolumeInfoService ¶
type VolumeInfoService interface { // GetvCenterForVolumeID return vCenter for the given VolumeID GetvCenterForVolumeID(ctx context.Context, volumeID string) (string, error) // CreateVolumeInfo creates VolumeInfo CR to persist VolumeID to vCenter mapping CreateVolumeInfo(ctx context.Context, volumeID string, vCenter string) error // CreateVolumeInfoWithPolicyInfo creates VolumeInfo CR to persist VolumeID, // pvcnamespace, storage policy info and vCenter details CreateVolumeInfoWithPolicyInfo(ctx context.Context, volumeID, pvcnamespace, storagePolicyId, storageClassName, vCenter string, capacity *resource.Quantity) error // DeleteVolumeInfo deletes VolumeInfo CR for the given VolumeID DeleteVolumeInfo(ctx context.Context, volumeID string) error // ListAllVolumeInfos lists all the VolumeInfo CRs present in the cluster ListAllVolumeInfos() []interface{} // VolumeInfoCrExistsForVolume returns true if VolumeInfo CR for // a given volume exists VolumeInfoCrExistsForVolume(ctx context.Context, volumeID string) (bool, error) // GetVolumeInfoForVolumeID fetches VolumeInfo CR for the given VolumeID and returns cnsvolumeinfo object GetVolumeInfoForVolumeID(ctx context.Context, volumeID string) (*cnsvolumeinfov1alpha1.CNSVolumeInfo, error) // PatchVolumeInfo patches the CNSVolumeInfo instance associated with volumeID in given parameters. PatchVolumeInfo(ctx context.Context, volumeID string, patchBytes []byte) error }
func InitVolumeInfoService ¶
func InitVolumeInfoService(ctx context.Context) (VolumeInfoService, error)
InitVolumeInfoService returns the singleton VolumeInfoService.
Click to show internal directories.
Click to hide internal directories.