podresources

package
v1.19.12-rc.0 Latest Latest
Warning

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

Go to latest
Published: May 12, 2021 License: Apache-2.0 Imports: 7 Imported by: 60

Documentation

Index

Constants

View Source
const (
	// Socket is the name of the podresources server socket
	Socket = "kubelet"
)

Variables

This section is empty.

Functions

func GetClient

func GetClient(socket string, connectionTimeout time.Duration, maxMsgSize int) (podresourcesapi.PodResourcesListerClient, *grpc.ClientConn, error)

GetClient returns a client for the PodResourcesLister grpc service

func NewPodResourcesServer

func NewPodResourcesServer(podsProvider PodsProvider, devicesProvider DevicesProvider) v1alpha1.PodResourcesListerServer

NewPodResourcesServer returns a PodResourcesListerServer which lists pods provided by the PodsProvider with device information provided by the DevicesProvider

Types

type DevicesProvider

type DevicesProvider interface {
	GetDevices(podUID, containerName string) []*v1alpha1.ContainerDevices
	UpdateAllocatedDevices()
}

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

type PodsProvider

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

PodsProvider knows how to provide the pods admitted by the node

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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