utils

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	SysBusPci = "/sys/bus/pci/devices"
)

Functions

func GetNetNames added in v1.1.0

func GetNetNames(pciAddr string) ([]string, error)

GetNetNames returns host net interface names as string for a PCI device from its pci address

func GetPCIDevDriver added in v1.1.0

func GetPCIDevDriver(pciAddr string) (string, error)

GetPCIDevDriver returns current driver attached to a pci device from its pci address

func GetPciAddress

func GetPciAddress(ifName string) (string, error)

GetPciAddress return the pci address for given interface name

func GetRdmaDevices

func GetRdmaDevices(pciAddress string) []string

GetRdmaDevices return rdma devices for given device pci address

func IsEmptySelector added in v1.1.0

func IsEmptySelector(selector *types.Selectors) bool

IsEmptySelector returns if the selector is empty

Types

type FakeFilesystem

type FakeFilesystem struct {
	RootDir  string
	Dirs     []string
	Files    map[string][]byte
	Symlinks map[string]string
}

FakeFilesystem allows to setup isolated fake files structure used for the tests.

func (*FakeFilesystem) Use

func (fs *FakeFilesystem) Use() func()

Use function creates entire files structure and returns a function to tear it down. Example usage: defer fs.Use()()

Jump to

Keyboard shortcuts

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