Documentation ¶
Index ¶
- Constants
- func GetClient(socket string, connectionTimeout time.Duration, maxMsgSize int) (podresourcesapi.PodResourcesListerClient, *grpc.ClientConn, error)
- func NewPodResourcesServer(podsProvider PodsProvider, devicesProvider DevicesProvider) v1alpha1.PodResourcesListerServer
- type DevicesProvider
- type PodsProvider
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 ¶
PodsProvider knows how to provide the pods admitted by the node
Click to show internal directories.
Click to hide internal directories.