Documentation ¶
Index ¶
- func GetBootKernelConfigMap(bootDir, kernelVersion string) (configMap map[string]string, err error)
- func GetKernelRelease() (string, error)
- func GetOSDistro(osReleaseContent string) (string, error)
- func GetProcKernelConfigMap(procDir string) (configMap map[string]string, err error)
- func GetSystemBlockDeviceInfo() (map[string]types.BlockDeviceInfo, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetBootKernelConfigMap ¶
GetBootKernelConfigMap reads the kernel config into a key-value map. It tries to read kernel config from ${bootDir}/config-${kernelVersion}, and comments are ignored. If the bootDir is empty, it points to /boot by default.
func GetKernelRelease ¶
GetKernelRelease returns the kernel release string.
func GetOSDistro ¶
GetOSDistro reads the /etc/os-release file and returns the ID field.
func GetProcKernelConfigMap ¶
GetProcKernelConfigMap reads the kernel config into a key-value map. It tries to read kernel config from procfs mounted at procDir from the view of processName in namespace. If the procDir is empty, it points to /proc by default.
func GetSystemBlockDeviceInfo ¶
func GetSystemBlockDeviceInfo() (map[string]types.BlockDeviceInfo, error)
GetSystemBlockDeviceInfo returns the block device info for the system.
Types ¶
This section is empty.