utils

package
v0.0.0-...-ac6acfc Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopyFile

func CopyFile(src string, dst string) error

func CreateFolder

func CreateFolder(path string, log logr.Logger) error
func CreateNoLinks(path string) (*os.File, error)

func DownloadFile

func DownloadFile(path, url, checksum string) error

func ExecCmd

func ExecCmd(args []string, log logr.Logger) (string, error)

func GetDriverVersion

func GetDriverVersion(dev ethernetv1.Device) string

func LoadSupportedDevices

func LoadSupportedDevices(cfgPath string, inStruct interface{}) error
func OpenFileNoLinks(path string, flag int, perm os.FileMode) (*os.File, error)
func OpenNoLinks(path string) (*os.File, error)

func RunExecWithLog

func RunExecWithLog(cmd *exec.Cmd, log logr.Logger) error

func UnpackDDPArchive

func UnpackDDPArchive(srcPath, dstPath string, log logr.Logger) error

func Untar

func Untar(srcPath string, dstPath string, log logr.Logger) error

func Unzip

func Unzip(srcPath, dstPath string, log logr.Logger) error

Types

type LogWriter

type LogWriter struct {
	Log    logr.Logger
	Stream string
}

func (*LogWriter) Write

func (l *LogWriter) Write(p []byte) (n int, err error)

type SupportedDevice

type SupportedDevice struct {
	VendorID string
	Class    string
	SubClass string
	DeviceID string
}

type SupportedDevices

type SupportedDevices map[string]SupportedDevice

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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