device_example

package
v0.0.0-...-8c0a17f Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DevicePlugin

type DevicePlugin struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

DevicePlugin implements the Kubernetes device plugin API

func NewDevicePlugin

func NewDevicePlugin() (*DevicePlugin, error)

NewDevicePlugin returns an initialized DevicePlugin

func (*DevicePlugin) Allocate

Allocate which return list of devices.

func (*DevicePlugin) GetDevicePluginOptions

func (m *DevicePlugin) GetDevicePluginOptions(context.Context, *pluginapi.Empty) (*pluginapi.DevicePluginOptions, error)

func (*DevicePlugin) ListAndWatch

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

func (*DevicePlugin) Register

func (m *DevicePlugin) Register(kubeletEndpoint, resourceName string) error

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

func (*DevicePlugin) Serve

func (m *DevicePlugin) Serve() error

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

func (*DevicePlugin) Start

func (m *DevicePlugin) Start() error

Start starts the gRPC server of the device plugin

func (*DevicePlugin) Stop

func (m *DevicePlugin) 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