@@ -15,19 +15,43 @@ type Volume struct {
1515
1616type Interface interface {
1717 DismountVolume (context.Context , * DismountVolumeRequest ) (* DismountVolumeResponse , error )
18+ // FormatVolume formats a volume with NTFS.
1819 FormatVolume (context.Context , * FormatVolumeRequest ) (* FormatVolumeResponse , error )
20+
21+ // GetClosestVolumeIDFromTargetPath gets the closest volume id for a given target path
22+ // by following symlinks and moving up in the filesystem, if after moving up in the filesystem
23+ // we get to a DriveLetter then the volume corresponding to this drive letter is returned instead.
1924 GetClosestVolumeIDFromTargetPath (context.Context , * GetClosestVolumeIDFromTargetPathRequest ) (* GetClosestVolumeIDFromTargetPathResponse , error )
25+
26+ // GetDiskNumberFromVolumeID gets the disk number of the disk where the volume is located.
2027 GetDiskNumberFromVolumeID (context.Context , * GetDiskNumberFromVolumeIDRequest ) (* GetDiskNumberFromVolumeIDResponse , error )
2128 GetVolumeDiskNumber (context.Context , * VolumeDiskNumberRequest ) (* VolumeDiskNumberResponse , error )
2229 GetVolumeIDFromMount (context.Context , * VolumeIDFromMountRequest ) (* VolumeIDFromMountResponse , error )
30+
31+ // GetVolumeIDFromTargetPath gets the volume id for a given target path.
2332 GetVolumeIDFromTargetPath (context.Context , * GetVolumeIDFromTargetPathRequest ) (* GetVolumeIDFromTargetPathResponse , error )
33+
34+ // GetVolumeStats gathers total bytes and used bytes for a volume.
2435 GetVolumeStats (context.Context , * GetVolumeStatsRequest ) (* GetVolumeStatsResponse , error )
36+
37+ // IsVolumeFormatted checks if a volume is formatted.
2538 IsVolumeFormatted (context.Context , * IsVolumeFormattedRequest ) (* IsVolumeFormattedResponse , error )
39+
40+ // ListVolumesOnDisk returns the volume IDs (in \\.\Volume{GUID} format) for all volumes from a
41+ // given disk number and partition number (optional)
2642 ListVolumesOnDisk (context.Context , * ListVolumesOnDiskRequest ) (* ListVolumesOnDiskResponse , error )
43+
44+ // MountVolume mounts the volume at the requested global staging path.
2745 MountVolume (context.Context , * MountVolumeRequest ) (* MountVolumeResponse , error )
46+
47+ // ResizeVolume performs resizing of the partition and file system for a block based volume.
2848 ResizeVolume (context.Context , * ResizeVolumeRequest ) (* ResizeVolumeResponse , error )
49+
50+ // UnmountVolume flushes data cache to disk and removes the global staging path.
2951 UnmountVolume (context.Context , * UnmountVolumeRequest ) (* UnmountVolumeResponse , error )
3052 VolumeStats (context.Context , * VolumeStatsRequest ) (* VolumeStatsResponse , error )
53+
54+ // WriteVolumeCache write volume cache to disk.
3155 WriteVolumeCache (context.Context , * WriteVolumeCacheRequest ) (* WriteVolumeCacheResponse , error )
3256}
3357
0 commit comments