deviceplugin

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ResourceName = "ucloud.cn/uni"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type UNIDevicePlugin

type UNIDevicePlugin struct {
	sync.Locker
	// contains filtered or unexported fields
}

UNIDevicePlugin implements the Kubernetes device plugin API

func NewUNIDevicePlugin

func NewUNIDevicePlugin(count int) *UNIDevicePlugin

NewUNIDevicePlugin returns an initialized UNIDevicePlugin

func (*UNIDevicePlugin) Allocate

Allocate which return list of devices.

func (*UNIDevicePlugin) GetDevicePluginOptions

GetDevicePluginOptions return device plugin options

func (*UNIDevicePlugin) ListAndWatch

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

func (*UNIDevicePlugin) PreStartContainer

PreStartContainer return container prestart hook

func (*UNIDevicePlugin) Register

func (m *UNIDevicePlugin) Register(request pluginapi.RegisterRequest) error

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

func (*UNIDevicePlugin) Serve

func (m *UNIDevicePlugin) Serve(resourceName string) error

Serve starts the gRPC server and register the device plugin to Kubelet

func (*UNIDevicePlugin) Start

func (m *UNIDevicePlugin) Start() error

Start starts the gRPC server of the device plugin

func (*UNIDevicePlugin) Stop

func (m *UNIDevicePlugin) Stop() error

Stop stops the gRPC server

Jump to

Keyboard shortcuts

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