utils

package
v0.0.0-...-419d114 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CONFIG_FILE_SIZE_LIMIT_IN_BYTES = 10485760 //10 MB
	SRIOV_PREFIX                    = "SRIOV_FEC_"
	PCI_PF_STUB_DASH                = "pci-pf-stub"
	PCI_PF_STUB_UNDERSCORE          = "pci_pf_stub"
	VFIO_PCI                        = "vfio-pci"
	VFIO_PCI_UNDERSCORE             = "vfio_pci"
	IGB_UIO                         = "igb_uio"
)

Variables

This section is empty.

Functions

func Filter

func Filter[T any](slice []T, filter func(T) bool) []T

func IsSingleNodeCluster

func IsSingleNodeCluster(c client.Client) (bool, error)

func NewLogWrapper

func NewLogWrapper() *logrusWrapper

func NewLogger

func NewLogger() *logrus.Logger

func SetOsEnvIfNotSet

func SetOsEnvIfNotSet(key, value string, logger logr.Logger) error

Types

type AcceleratorDiscoveryConfig

type AcceleratorDiscoveryConfig struct {
	VendorID  map[string]string
	Class     string
	SubClass  string
	Devices   map[string]string
	NodeLabel string
}

func LoadDiscoveryConfig

func LoadDiscoveryConfig(cfgPath string) (AcceleratorDiscoveryConfig, error)

Jump to

Keyboard shortcuts

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