 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Index ¶
- Constants
- func GetV1Client(socket string, connectionTimeout time.Duration, maxMsgSize int) (v1.PodResourcesListerClient, *grpc.ClientConn, error)
- func GetV1alpha1Client(socket string, connectionTimeout time.Duration, maxMsgSize int) (v1alpha1.PodResourcesListerClient, *grpc.ClientConn, error)
- func NewV1PodResourcesServer(podsProvider PodsProvider, devicesProvider DevicesProvider, ...) v1.PodResourcesListerServer
- func NewV1alpha1PodResourcesServer(podsProvider PodsProvider, devicesProvider DevicesProvider) v1alpha1.PodResourcesListerServer
- type CPUsProvider
- type DevicesProvider
- type MemoryProvider
- type PodsProvider
Constants ¶
const (
	// Socket is the name of the podresources server socket
	Socket = "kubelet"
)
    Variables ¶
This section is empty.
Functions ¶
func GetV1Client ¶ added in v1.20.0
func GetV1Client(socket string, connectionTimeout time.Duration, maxMsgSize int) (v1.PodResourcesListerClient, *grpc.ClientConn, error)
GetV1Client returns a client for the PodResourcesLister grpc service
func GetV1alpha1Client ¶ added in v1.20.0
func GetV1alpha1Client(socket string, connectionTimeout time.Duration, maxMsgSize int) (v1alpha1.PodResourcesListerClient, *grpc.ClientConn, error)
GetV1alpha1Client returns a client for the PodResourcesLister grpc service Note: This is deprecated
func NewV1PodResourcesServer ¶ added in v1.20.0
func NewV1PodResourcesServer(podsProvider PodsProvider, devicesProvider DevicesProvider, cpusProvider CPUsProvider, memoryProvider MemoryProvider) v1.PodResourcesListerServer
NewV1PodResourcesServer returns a PodResourcesListerServer which lists pods provided by the PodsProvider with device information provided by the DevicesProvider
func NewV1alpha1PodResourcesServer ¶ added in v1.20.0
func NewV1alpha1PodResourcesServer(podsProvider PodsProvider, devicesProvider DevicesProvider) v1alpha1.PodResourcesListerServer
NewV1alpha1PodResourcesServer returns a PodResourcesListerServer which lists pods provided by the PodsProvider with device information provided by the DevicesProvider
Types ¶
type CPUsProvider ¶ added in v1.20.0
type CPUsProvider interface {
	// GetCPUs returns information about the cpus assigned to pods and containers
	GetCPUs(podUID, containerName string) []int64
	// GetAllocatableCPUs returns the allocatable (not allocated) CPUs
	GetAllocatableCPUs() []int64
}
    CPUsProvider knows how to provide the cpus used by the given container
type DevicesProvider ¶
type DevicesProvider interface {
	// UpdateAllocatedDevices frees any Devices that are bound to terminated pods.
	UpdateAllocatedDevices()
	// GetDevices returns information about the devices assigned to pods and containers
	GetDevices(podUID, containerName string) []*podresourcesapi.ContainerDevices
	// 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 MemoryProvider ¶ added in v1.22.0
type MemoryProvider interface {
	// GetMemory returns information about the memory assigned to containers
	GetMemory(podUID, containerName string) []*podresourcesapi.ContainerMemory
	// GetAllocatableMemory returns the allocatable memory from the node
	GetAllocatableMemory() []*podresourcesapi.ContainerMemory
}
    type PodsProvider ¶
PodsProvider knows how to provide the pods admitted by the node