Documentation ¶
Index ¶
- Constants
- func EnsureBlock(target string) error
- func GetNameKey(nameSpace, name string) string
- func GetNodeNameFromCsiPV(pv *corev1.PersistentVolume) string
- func GetVGNameFromCsiPV(pv *corev1.PersistentVolume) string
- func GetVolumeSnapshotContent(snapclient snapshot.Interface, snapshotContentID string) (*snapshotapi.VolumeSnapshotContent, error)
- func IsBlockDevice(fullPath string) (bool, error)
- func MountBlock(source, target string, opts ...string) error
- func Run(cmd string) (string, error)
- type CommandRunFunc
- type OSTool
Constants ¶
View Source
const ( VGName = "csi.io/volume-group-name" EnvSnapshotPrefix = "SNAPSHOT_PREFIX" DefaultSnapshotPrefix = "snap" KubernetesNodeIdentityKey = "kubernetes.io/hostname" )
Variables ¶
This section is empty.
Functions ¶
func EnsureBlock ¶
func GetNameKey ¶
func GetNodeNameFromCsiPV ¶
func GetNodeNameFromCsiPV(pv *corev1.PersistentVolume) string
func GetVGNameFromCsiPV ¶
func GetVGNameFromCsiPV(pv *corev1.PersistentVolume) string
func GetVolumeSnapshotContent ¶
func GetVolumeSnapshotContent(snapclient snapshot.Interface, snapshotContentID string) (*snapshotapi.VolumeSnapshotContent, error)
func IsBlockDevice ¶
IsBlockDevice checks if the given path is a block device
func MountBlock ¶
Types ¶
type CommandRunFunc ¶
CommandRunFunc define the run function in utils for ut
type OSTool ¶
type OSTool interface { Remove(name string) error Stat(name string) (os.FileInfo, error) MkdirAll(path string, perm os.FileMode) error RunCommand(cmd string) (string, error) IsBlockDevice(fullPath string) (bool, error) MountBlock(source, target string, opts ...string) error EnsureBlock(target string) error CleanupMountPoint(mountPath string, mounter mountutils.Interface, extensiveMountPointCheck bool) error ResizeFS(devicePath string, deviceMountPath string) (bool, error) }
func NewFakeOSTool ¶
func NewFakeOSTool() OSTool
Click to show internal directories.
Click to hide internal directories.