podresources

package
v1.13.2 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2019 License: Apache-2.0 Imports: 7 Imported by: 0

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
}

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
Package v1alpha1 is a generated protocol buffer package.
Package v1alpha1 is a generated protocol buffer package.

Jump to

Keyboard shortcuts

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