cdidevices

package
v0.20.0 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2025 License: Apache-2.0 Imports: 10 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(name string, setup Setup)

Register registers new setup for a device.

Types

type Device

type Device struct {
	Name        string
	AutoAllow   bool
	OnDemand    bool
	Annotations map[string]string
}

type Manager

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

func NewManager

func NewManager(cache *cdi.Cache, autoAllowed []string) *Manager

func (*Manager) FindDevices

func (m *Manager) FindDevices(devs ...*pb.CDIDevice) ([]string, error)

func (*Manager) GetDevice

func (m *Manager) GetDevice(name string) Device

func (*Manager) InjectDevices

func (m *Manager) InjectDevices(spec *specs.Spec, devs ...*pb.CDIDevice) error

func (*Manager) ListDevices

func (m *Manager) ListDevices() []Device

func (*Manager) OnDemandInstaller

func (m *Manager) OnDemandInstaller(name string) (func(context.Context) error, bool)

func (*Manager) Refresh

func (m *Manager) Refresh() error

type Setup

type Setup interface {
	Validate() error
	Run(ctx context.Context) error
}

Jump to

Keyboard shortcuts

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