devicepluginmanager

package
v1.28.0-alpha.79 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DevicePluginManager

type DevicePluginManager struct {
}

DevicePluginManager manager for device plugins

func NewDevicePluginManager

func NewDevicePluginManager() *DevicePluginManager

NewDevicePluginManager xxx new DevicePluginManager function

func (*DevicePluginManager) Allocate

func (m *DevicePluginManager) Allocate(ex *comtypes.ExtendedResource, deviceIds []string) (map[string]string, error)

Allocate xxx request deviceplugin to allocate extended resources before create container call the function

func (*DevicePluginManager) ListAndWatch

ListAndWatch xxx request device plugin to listandwatch device list ids return deviceIds, examples: ["cpuset0","cpuset1","cpuset2"...]

func (*DevicePluginManager) PreStartContainer

func (m *DevicePluginManager) PreStartContainer(ex *comtypes.ExtendedResource, deviceIds []string) error

PreStartContainer xxx request deviceplugin to allocate extended resources before create container call the function

type ResourceManager

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

ResourceManager manager for extended resources

func NewResourceManager

func NewResourceManager(devicePluginM *DevicePluginManager,
	extendedResourceDriver *extendedresource.Driver) *ResourceManager

NewResourceManager create resource manager

func (*ResourceManager) ApplyExtendedResources

func (rm *ResourceManager) ApplyExtendedResources(
	ex *comtypes.ExtendedResource, taskID string) (map[string]string, error)

ApplyExtendedResources apply extended resource, records to file, and call device plugin return envs after device plugin Allocate

func (*ResourceManager) ReleaseExtendedResources

func (rm *ResourceManager) ReleaseExtendedResources(exName, taskID string) error

ReleaseExtendedResources release extended resource allocation in executor

Jump to

Keyboard shortcuts

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