manager

package
v0.19.0 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Interface

type Interface interface {
	GetPlugins() ([]plugin.Interface, error)
	CreateCDISpecFile() error
}

Interface defines the API for the plugin manager package

func New

func New(opts ...Option) (Interface, error)

New creates a new plugin manager with the supplied options.

type Option

type Option func(*manager)

Option is a function that configures a manager

func WithCDIEnabled

func WithCDIEnabled(enabled bool) Option

WithCDIEnabled sets whether CDI is enabled for the manager

func WithCDIHandler

func WithCDIHandler(handler cdi.Interface) Option

WithCDIHandler sets the CDI handler for the manager

func WithConfig

func WithConfig(config *util.DeviceConfig) Option

WithConfig sets the config reference for the manager

func WithFailOnInitError

func WithFailOnInitError(failOnInitError bool) Option

WithFailOnInitError sets whether the manager should fail on initialization errors

func WithMigStrategy

func WithMigStrategy(migStrategy string) Option

WithMigStrategy sets the MIG strategy for the manager

func WithNVML

func WithNVML(nvmllib nvml.Interface) Option

WithNVML sets the NVML handler for the manager

Jump to

Keyboard shortcuts

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