server

package
v0.0.0-...-1c73a57 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// KubeSocket kubelet unix socket
	KubeSocket = "kubelet.sock"

	// PluginPath device defautl path
	PluginPath = "/var/lib/kubelet/device-plugins/"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type MicroDeviceServer

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

MicroDeviceServer is a device plugin server

func NewMicroDeviceServer

func NewMicroDeviceServer() *MicroDeviceServer

NewMicroDeviceServer creates a new device plugin server

func (*MicroDeviceServer) Allocate

Allocate make the device avilable in container

func (*MicroDeviceServer) GetDevicePluginOptions

GetDevicePluginOptions return options for the device plugin

func (*MicroDeviceServer) GetPreferredAllocation

GetPreferredAllocation return the devices chosen for allocation based on the given options

func (*MicroDeviceServer) ListAndWatch

ListAndWatch return a stream of list devices and update that stream whenever changes

func (*MicroDeviceServer) PreStartContainer

PreStartContainer is called during the device plugin pod starting

func (*MicroDeviceServer) RegisterToKubelet

func (s *MicroDeviceServer) RegisterToKubelet() error

RegisterToKubelet registers the micro device plugin with kubelet

func (*MicroDeviceServer) Run

func (s *MicroDeviceServer) Run() error

Run starts the micro device plugin server

Jump to

Keyboard shortcuts

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