plugin

package
v0.37.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	NodeLockNvidia = "hami.io/mutex.lock"
)

Constants for use by the 'volume-mounts' device list strategy

Variables

This section is empty.

Functions

This section is empty.

Types

type Interface

type Interface interface {
	Devices() rm.Devices
	Start() error
	Stop() error
}

Interface defines the API for the plugin package

type NvidiaDevicePlugin

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

NvidiaDevicePlugin implements the Kubernetes device plugin API

func NewNvidiaDevicePlugin

func NewNvidiaDevicePlugin(config *util.DeviceConfig, resourceManager rm.ResourceManager, cdiHandler cdi.Interface, cdiEnabled bool) *NvidiaDevicePlugin

NewNvidiaDevicePlugin returns an initialized NvidiaDevicePlugin

func (*NvidiaDevicePlugin) Allocate

Allocate which return list of devices.

func (*NvidiaDevicePlugin) Devices

func (plugin *NvidiaDevicePlugin) Devices() rm.Devices

Devices returns the full set of devices associated with the plugin.

func (*NvidiaDevicePlugin) GetDevicePluginOptions

GetDevicePluginOptions returns the values of the optional settings for this plugin

func (*NvidiaDevicePlugin) GetPreferredAllocation

GetPreferredAllocation returns the preferred allocation from the set of devices specified in the request

func (*NvidiaDevicePlugin) ListAndWatch

ListAndWatch lists devices and update that list according to the health status

func (*NvidiaDevicePlugin) PreStartContainer

PreStartContainer is unimplemented for this plugin

func (*NvidiaDevicePlugin) Register

func (plugin *NvidiaDevicePlugin) Register() error

Register registers the device plugin for the given resourceName with Kubelet.

func (*NvidiaDevicePlugin) RegistrInAnnotation

func (plugin *NvidiaDevicePlugin) RegistrInAnnotation() error

func (*NvidiaDevicePlugin) Serve

func (plugin *NvidiaDevicePlugin) Serve() error

Serve starts the gRPC server of the device plugin.

func (*NvidiaDevicePlugin) Start

func (plugin *NvidiaDevicePlugin) Start() error

Start starts the gRPC server, registers the device plugin with the Kubelet, and starts the device healthchecks.

func (*NvidiaDevicePlugin) Stop

func (plugin *NvidiaDevicePlugin) Stop() error

Stop stops the gRPC server.

func (*NvidiaDevicePlugin) WatchAndRegister

func (plugin *NvidiaDevicePlugin) WatchAndRegister()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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