package cdidevices

import "github.com/moby/buildkit/solver/llbsolver/cdidevices"

Index

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
}

Source Files

manager.go

Version
v0.20.0
Published
Feb 19, 2025
Platform
js/wasm
Imports
10 packages
Last checked
2 minutes ago

Tools for package owners.