podresources

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewV1PodResourcesServer

func NewV1PodResourcesServer(
	podsProvider PodsProvider,
	resourcesProvider ResourcesProvider,
	devicesProvider DevicesProvider,
	emitter metrics.MetricEmitter) v1.PodResourcesListerServer

Types

type DevicesProvider

type DevicesProvider interface {
	// GetDevices returns information about the devices assigned to pods and containers
	GetDevices() []*podresourcesapi.PodResources
	// GetAllocatableDevices returns information about all the devices known to the manager
	GetAllocatableDevices() []*podresourcesapi.ContainerDevices
}

DevicesProvider knows how to provide the devices used by the given container

type DevicesProviderStub

type DevicesProviderStub struct{}

func (*DevicesProviderStub) GetAllocatableDevices

func (p *DevicesProviderStub) GetAllocatableDevices() []*podresourcesapi.ContainerDevices

func (*DevicesProviderStub) GetDevices

type PodsProvider

type PodsProvider interface {
	GetPods() []*v1.Pod
}

PodsProvider knows how to provide the pods admitted by the node

type ResourcesProvider

type ResourcesProvider interface {
	// UpdateAllocatedResources frees any Resources that are bound to terminated pods.
	UpdateAllocatedResources()
	// GetTopologyAwareResources returns information about the resources assigned to pods and containers in topology aware format
	GetTopologyAwareResources(pod *v1.Pod, container *v1.Container) []*podresourcesapi.TopologyAwareResource
	// GetTopologyAwareAllocatableResources returns information about all the resources known to the manager in topology aware format
	GetTopologyAwareAllocatableResources() []*podresourcesapi.AllocatableTopologyAwareResource
}

ResourcesProvider knows how to provide the resources used by the given container

Directories

Path Synopsis
Package testing is a generated GoMock package.
Package testing is a generated GoMock package.

Jump to

Keyboard shortcuts

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