resources

package
v0.0.0-...-a586aca Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2022 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var VirtioPath = "/sys/bus/pci/drivers/virtio-pci/"

Functions

func Arrcmp

func Arrcmp(src []string, dest []string) ([]string, []string)

func NewDdpSelector

func NewDdpSelector(profiles []string) types.DeviceSelector

NewDdpSelector returns a DeviceSelector interface to filter devices based on available DDP profile

func NewDeviceSelector

func NewDeviceSelector(devices []string) types.DeviceSelector

NewDeviceSelector returns a DeviceSelector interface for device list

func NewDriverSelector

func NewDriverSelector(drivers []string) types.DeviceSelector

NewDriverSelector returns a DeviceSelector interface for driver list

func NewGenericInfoProvider

func NewGenericInfoProvider(pciAddr string) types.DeviceInfoProvider

NewGenericInfoProvider instantiate a generic DeviceInfoProvider

func NewLinkTypeSelector

func NewLinkTypeSelector(linkTypes []string) types.DeviceSelector

NewLinkTypeSelector returns a interface for netDev list

func NewPciAddressSelector

func NewPciAddressSelector(pciAddresses []string) types.DeviceSelector

NewPciAddressSelector returns a NetDevSelector interface for netDev list

func NewPciDevice

func NewPciDevice(dev *ghw.PCIDevice, rFactory types.ResourceFactory, infoProviders []types.DeviceInfoProvider) (types.PciDevice, error)

NewPciDevice returns an instance of PciDevice interface A list of DeviceInfoProviders can be set externally. If empty, the default driver-based selection provided by ResourceFactory will be used

func NewPfNameSelector

func NewPfNameSelector(pfNames []string) types.DeviceSelector

NewPfNameSelector returns a NetDevSelector interface for netDev list

func NewResourceServer

func NewResourceServer(prefix, suffix string, pluginWatch bool, rp types.ResourcePool) types.ResourceServer

NewResourceServer returns an instance of ResourceServer

func NewRootDeviceSelector

func NewRootDeviceSelector(rootDevices []string) types.DeviceSelector

NewRootDeviceSelector returns a NetDevSelector interface for netDev list

func NewUioInfoProvider

func NewUioInfoProvider(pciAddr string) types.DeviceInfoProvider

NewUioInfoProvider return instance of uio DeviceInfoProvider

func NewVendorSelector

func NewVendorSelector(vendors []string) types.DeviceSelector

NewVendorSelector returns a DeviceSelector interface for vendor list

func NewVfioInfoProvider

func NewVfioInfoProvider(pciAddr string) types.DeviceInfoProvider

NewVfioInfoProvider create instance of VFIO DeviceInfoProvider

func Newapidevice

func Newapidevice(pciAddr string) *pluginapi.Device

Types

type ResourcePoolImpl

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

ResourcePoolImpl implements stub ResourcePool interface

func NewResourcePool

func NewResourcePool(rc *types.ResourceConfig, apiDevices map[string]*pluginapi.Device,
	devicePool map[string]types.PciDevice) *ResourcePoolImpl

NewResourcePool returns an instance of resourcePool

func (*ResourcePoolImpl) CleanDeviceInfoFile

func (rp *ResourcePoolImpl) CleanDeviceInfoFile(resourceNamePrefix string) error

CleanDeviceInfoFile does nothing. DeviceType-specific ResourcePools might clean the Device Info file

func (*ResourcePoolImpl) DeviceSpecExist

func (rp *ResourcePoolImpl) DeviceSpecExist(specs []*pluginapi.DeviceSpec, newSpec *pluginapi.DeviceSpec) bool

DeviceSpecExist checks if a DeviceSpec already exist in a DeviceSpec list

func (*ResourcePoolImpl) GetConfig

func (rp *ResourcePoolImpl) GetConfig() *types.ResourceConfig

GetConfig returns ResourceConfig for this resourcePool

func (*ResourcePoolImpl) GetDevicePool

func (rp *ResourcePoolImpl) GetDevicePool() map[string]types.PciDevice

GetDevicePool returns PciDevice pool as a map

func (*ResourcePoolImpl) GetDeviceSpecs

func (rp *ResourcePoolImpl) GetDeviceSpecs(deviceIDs []string) []*pluginapi.DeviceSpec

GetDeviceSpecs returns list of plugin API device specs for a list of device IDs

func (*ResourcePoolImpl) GetDevices

func (rp *ResourcePoolImpl) GetDevices() map[string]*pluginapi.Device

GetDevices returns a map of Kubelet API devices

func (*ResourcePoolImpl) GetEnvs

func (rp *ResourcePoolImpl) GetEnvs(deviceIDs []string) []string

GetEnvs returns a list of device specific Env values for device IDs

func (*ResourcePoolImpl) GetMounts

func (rp *ResourcePoolImpl) GetMounts(deviceIDs []string) []*pluginapi.Mount

GetMounts returns a list of Mount for device IDs

func (*ResourcePoolImpl) GetResourceName

func (rp *ResourcePoolImpl) GetResourceName() string

GetResourceName returns the resource name as string

func (*ResourcePoolImpl) GetResourcePrefix

func (rp *ResourcePoolImpl) GetResourcePrefix() string

GetResourcePrefix returns the resource name prefix as string

func (*ResourcePoolImpl) InitDevice

func (rp *ResourcePoolImpl) InitDevice() error

InitDevice - not implemented

func (*ResourcePoolImpl) Probe

func (rp *ResourcePoolImpl) Probe() bool

Probe - does device healthcheck. Not implemented

func (*ResourcePoolImpl) StoreDeviceInfoFile

func (rp *ResourcePoolImpl) StoreDeviceInfoFile(resourceNamePrefix string) error

StoreDeviceInfoFile does nothing. DeviceType-specific ResourcePools might store information according to the k8snetworkplumbingwg/device-info-spec

Jump to

Keyboard shortcuts

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