pkg

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2021 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MetricsServer

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

func NewMetricsServer

func NewMetricsServer(port int, deviceConfig VirtualDeviceConfig) *MetricsServer

func (*MetricsServer) Start

func (s *MetricsServer) Start() error

func (*MetricsServer) Stop

func (s *MetricsServer) Stop() error

type VirtualDeviceConfig

type VirtualDeviceConfig struct {
	ResourceName string `yaml:"resourceName"`
	SocketName   string `yaml:"socketName"`
	Count        int    `yaml:"count"`
}

func GetVirtualDeviceConfig

func GetVirtualDeviceConfig(path string) (*VirtualDeviceConfig, error)

func (*VirtualDeviceConfig) Validate

func (vdc *VirtualDeviceConfig) Validate() error

type VirtualDeviceManager

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

VirtualDeviceManager manages our virtual devices

func NewVirtualDeviceManager

func NewVirtualDeviceManager(devConfig VirtualDeviceConfig) (*VirtualDeviceManager, error)

func (*VirtualDeviceManager) Allocate

Allocate devices

func (*VirtualDeviceManager) GetDevicePluginOptions

func (*VirtualDeviceManager) ListAndWatch

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

func (*VirtualDeviceManager) Register

func (vdm *VirtualDeviceManager) Register() error

Register with kubelet

func (*VirtualDeviceManager) Start

func (vdm *VirtualDeviceManager) Start() error

Start starts the gRPC server of the device plugin

func (*VirtualDeviceManager) Stop

func (vdm *VirtualDeviceManager) 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