Documentation
¶
Index ¶
- type ResourcePlugin
- type ResourcePluginStub
- func (r ResourcePluginStub) Allocate(_ context.Context, resourceReq *pluginapi.ResourceRequest, ...) (*pluginapi.ResourceAllocationResponse, error)
- func (r ResourcePluginStub) GetTopologyAwareAllocatableResources(context.Context) (*gpuconsts.AllocatableResource, error)
- func (r ResourcePluginStub) GetTopologyAwareResources(_ context.Context, podUID, containerName string) (*pluginapi.GetTopologyAwareResourcesResponse, error)
- func (r ResourcePluginStub) GetTopologyHints(context.Context, *pluginapi.ResourceRequest) (*pluginapi.ResourceHintsResponse, error)
- func (r ResourcePluginStub) ResourceName() string
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 (r ResourcePluginStub) Allocate(_ context.Context, resourceReq *pluginapi.ResourceRequest, deviceReq *pluginapi.DeviceRequest) (*pluginapi.ResourceAllocationResponse, error)
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) GetTopologyHints ¶
func (r ResourcePluginStub) GetTopologyHints(context.Context, *pluginapi.ResourceRequest) (*pluginapi.ResourceHintsResponse, error)
func (ResourcePluginStub) ResourceName ¶
func (r ResourcePluginStub) ResourceName() string
Click to show internal directories.
Click to hide internal directories.