os

package
v0.0.0-...-ec72bf4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 13, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func UpdateSystemdConfigOption

func UpdateSystemdConfigOption(linkPath, key, velue string) error

Types

type HostOS

type HostOS interface {
	// DisableDHCPv6
	DisableDHCPv6(udevName, cceName string) error
	DisableMacPersistant() error
}

type Interface

type Interface interface {
	DetectKernelVersion(ctx context.Context) (string, error)
	GetModules(ctx context.Context, wantedModules []string) ([]string, error)
}

type LinuxKernelHandler

type LinuxKernelHandler struct {
	// contains filtered or unexported fields
}

func NewLinuxKernelHandler

func NewLinuxKernelHandler() *LinuxKernelHandler

NewLinuxKernelHandler initializes LinuxKernelHandler with exec.

func (*LinuxKernelHandler) DetectKernelVersion

func (kh *LinuxKernelHandler) DetectKernelVersion(ctx context.Context) (string, error)

func (*LinuxKernelHandler) GetModulesAndTryToLoadByWanted

func (kh *LinuxKernelHandler) GetModulesAndTryToLoadByWanted(ctx context.Context, wantedModules []string) ([]string, error)

GetModulesAndTryToLoadByWanted returns all installed kernel modules which match any of the specified names. Try to load the required kernel modules if not built in.

type OSRelease

type OSRelease struct {
	Name       string
	Version    string
	ID         string
	IDLike     string
	PrettyName string
	VersionID  string
	HomeURL    string
	Comment    string
}

func NewOSDistribution

func NewOSDistribution() (*OSRelease, error)

NewOSDistribution returns a new OSRelease object.

-------

func (*OSRelease) HostOS

func (o *OSRelease) HostOS() HostOS

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL