Documentation ¶
Index ¶
Constants ¶
View Source
const ( // CRDName represent the name of cnsvspherevolumemigrations CRD. CRDName = "cnsvspherevolumemigrations.cns.vmware.com" // CRDGroupName represent the group of cnsvspherevolumemigrations CRD. CRDGroupName = "cns.vmware.com" // CRDSingular represent the singular name of cnsvspherevolumemigrations CRD. CRDSingular = "cnsvspherevolumemigration" // CRDPlural represent the plural name of cnsvspherevolumemigrations CRD. CRDPlural = "cnsvspherevolumemigrations" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type VolumeMigrationService ¶
type VolumeMigrationService interface { // GetVolumeID returns VolumeID for a given VolumeSpec. // Returns an error if not able to retrieve VolumeID. GetVolumeID(ctx context.Context, volumeSpec *VolumeSpec) (string, error) // GetVolumePath returns VolumePath for a given VolumeID. // Returns an error if not able to retrieve VolumePath. GetVolumePath(ctx context.Context, volumeID string) (string, error) // DeleteVolumeInfo helps delete mapping of volumePath to VolumeID for // specified volumeID. DeleteVolumeInfo(ctx context.Context, volumeID string) error }
VolumeMigrationService exposes interfaces to support VCP to CSI migration. It will maintain internal state to map volume path to volume ID and reverse mapping.
func GetVolumeMigrationService ¶
func GetVolumeMigrationService(ctx context.Context, volumeManager *cnsvolume.Manager, cnsConfig *cnsconfig.Config, runCleanupRoutine bool) (VolumeMigrationService, error)
GetVolumeMigrationService returns the singleton VolumeMigrationService. Starts a cleanup routine to delete stale CRD instances if needed.
type VolumeSpec ¶
VolumeSpec contains VolumePath and StoragePolicyID, using which Volume can be looked up via VolumeMigrationService.
Click to show internal directories.
Click to hide internal directories.