mlu

package
v0.0.0-...-c3af27a Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2022 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CambriconDevicePlugin

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

CambriconDevicePlugin implements the Kubernetes device plugin API

func NewCambriconDevicePlugin

func NewCambriconDevicePlugin(o Options) *CambriconDevicePlugin

NewCambriconDevicePlugin returns an initialized CambriconDevicePlugin

func (*CambriconDevicePlugin) Allocate

Allocate which return list of devices.

func (*CambriconDevicePlugin) GetDevicePluginOptions

func (*CambriconDevicePlugin) GetDeviceUUIDByIndex

func (m *CambriconDevicePlugin) GetDeviceUUIDByIndex(index uint) (uuid string, found bool)

func (*CambriconDevicePlugin) GetPreferredAllocatedDeviceUUIDs

func (m *CambriconDevicePlugin) GetPreferredAllocatedDeviceUUIDs(available []uint, required []uint, size int) ([]string, error)

func (*CambriconDevicePlugin) ListAndWatch

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

func (*CambriconDevicePlugin) PrepareResponse

func (*CambriconDevicePlugin) Register

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

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

func (*CambriconDevicePlugin) Serve

func (m *CambriconDevicePlugin) Serve() error

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

func (*CambriconDevicePlugin) Start

func (m *CambriconDevicePlugin) Start() error

Start starts the gRPC server of the device plugin

func (*CambriconDevicePlugin) Stop

func (m *CambriconDevicePlugin) Stop() error

Stop stops the gRPC server

type Options

type Options struct {
	Mode               string `` /* 156-byte string literal not displayed */
	MLULinkPolicy      string `` /* 142-byte string literal not displayed */
	VirtualizationNum  uint   `` /* 158-byte string literal not displayed */
	DisableHealthCheck bool   `long:"disable-health-check" description:"disable MLU health check"`
	NodeName           string `long:"node-name" description:"host node name" env:"NODE_NAME"`
	EnableConsole      bool   `long:"enable-console" description:"enable UART console device(/dev/ttyMS) in container"`
	EnableDeviceType   bool   `long:"enable-device-type" description:"enable device registration with type info"`
	CnmonPath          string `long:"cnmon-path" description:"host cnmon path"`
}

func ParseFlags

func ParseFlags() Options

Jump to

Keyboard shortcuts

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