Documentation ¶
Index ¶
- Constants
- func CallerWithCondLock[T any](cond *sync.Cond, f func() T) T
- func ContainsIgnoredCase(s []string, k string) bool
- func GetFullDevPath(shortPath string) string
- func IsFSCorrupted(err error) bool
- func IsHostProcMounted() (bool, error)
- func IsSupportedFileSystem(fsType string) bool
- func MakeExt4DiskFormatting(devPath, uuid string) error
- func MatchesIgnoredCase(s []string, k string) bool
- func MountDisk(devPath, mountPoint string) error
- func UmountDisk(path string) error
- func XMLWriter(targetFilePath string, xmlData any) error
- type Disk
- type Driver
- type Source
- type Target
Constants ¶
View Source
const ( // ProcPath is a vfs storing process info for Linux. ProcPath = "/proc" // HostProcPath is the convention path where host `/proc` is mounted. HostProcPath = "/host/proc" // DiskRemoveTag indicates a Longhorn is pending to remove. DiskRemoveTag = "harvester-ndm-disk-remove" )
Variables ¶
This section is empty.
Functions ¶
func CallerWithCondLock ¶
CallerWithLock is a helper function to call a function with a condition lock
func ContainsIgnoredCase ¶
func GetFullDevPath ¶
func IsFSCorrupted ¶
func IsHostProcMounted ¶
IsHostProcMounted checks if host's proc info `/proc` is mounted on `/host/proc`
func IsSupportedFileSystem ¶
func MakeExt4DiskFormatting ¶
func MatchesIgnoredCase ¶
func UmountDisk ¶
UmountDisk unmounts the specified volume device to the specified path
Types ¶
type Disk ¶ added in v0.5.3
type Disk struct { XMLName xml.Name `xml:"disk"` Type string `xml:"type,attr"` Device string `xml:"device,attr"` Driver Driver `xml:"driver"` Source Source `xml:"source"` Target Target `xml:"target"` WWN string `xml:"wwn"` }
func DiskXMLReader ¶ added in v0.5.3
DiskXMLReader can read the libvirt disk xml file and return a Disk struct
Click to show internal directories.
Click to hide internal directories.