plugin

package
v0.0.0-...-b1d97f5 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	BandWidth         bool `json:"bandWidth"`
	CpuIdleTime       bool `json:"cpuIdleTime"`
	CpuRequest        bool `json:"cpuRequest"`
	DProcessNum       bool `json:"dProcessNum"`
	DeviceIo          bool `json:"deviceIo"`
	FileDescriptor    bool `json:"fileDescriptor"`
	FreeMemory        bool `json:"freeMemory"`
	Load5             bool `json:"load5"`
	MemRequest        bool `json:"memRequest"`
	MountpointInode   bool `json:"mountpointInode"`
	MountpointStorage bool `json:"mountpointStorage"`
	PodNum            bool `json:"podNum"`
	ProcessNum        bool `json:"processNum"`
	ZProcessNum       bool `json:"zProcessNum"`
}

Config 结构用于映射配置文件中的字段

type HealthyDevicePlugin

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

HealthyDevicePlugin implements the Kubernetes device plugin API

func NewHealthyDevicePlugin

func NewHealthyDevicePlugin(resourceName string, socket string) *HealthyDevicePlugin

NewHealthyDevicePlugin returns an initialized HealthyDevicePlugin

func (*HealthyDevicePlugin) Allocate

Allocate which return list of devices.

func (*HealthyDevicePlugin) GetDevicePluginOptions

GetDevicePluginOptions returns the values of the optional settings for this plugin

func (*HealthyDevicePlugin) GetPreferredAllocation

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

func (*HealthyDevicePlugin) ListAndWatch

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

func (*HealthyDevicePlugin) PreStartContainer

PreStartContainer is unimplemented for this plugin

func (*HealthyDevicePlugin) Register

func (m *HealthyDevicePlugin) Register() error

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

func (*HealthyDevicePlugin) Serve

func (m *HealthyDevicePlugin) Serve() error

Serve starts the gRPC server of the device plugin.

func (*HealthyDevicePlugin) Start

func (m *HealthyDevicePlugin) Start() error

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

func (*HealthyDevicePlugin) Stop

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