resourceplugin

package
v0.5.41 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ResourcePlugin

type ResourcePlugin interface {
	ResourceName() string

	GetTopologyHints(ctx context.Context, request *pluginapi.ResourceRequest) (*pluginapi.ResourceHintsResponse, error)

	GetTopologyAwareResources(ctx context.Context, podUID, containerName string) (*pluginapi.GetTopologyAwareResourcesResponse, error)

	GetTopologyAwareAllocatableResources(ctx context.Context) (*gpuconsts.AllocatableResource, error)

	Allocate(
		ctx context.Context, resourceReq *pluginapi.ResourceRequest, deviceReq *pluginapi.DeviceRequest,
	) (*pluginapi.ResourceAllocationResponse, error)
}

ResourcePlugin knows how to handle resource requests for a specific resource type.

func NewResourcePluginStub

func NewResourcePluginStub(base *baseplugin.BasePlugin) ResourcePlugin

type ResourcePluginStub

type ResourcePluginStub struct {
	*baseplugin.BasePlugin
}

func (ResourcePluginStub) Allocate

func (ResourcePluginStub) GetTopologyAwareAllocatableResources

func (r ResourcePluginStub) GetTopologyAwareAllocatableResources(context.Context) (*gpuconsts.AllocatableResource, error)

func (ResourcePluginStub) GetTopologyAwareResources

func (r ResourcePluginStub) GetTopologyAwareResources(_ context.Context, podUID, containerName string) (*pluginapi.GetTopologyAwareResourcesResponse, error)

func (ResourcePluginStub) ResourceName

func (r ResourcePluginStub) ResourceName() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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