Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MakeLogicalCoreIDToNodeIDMap ¶
func MakeLogicalCoreIDToNodeIDMap(topo *ghw.TopologyInfo) map[int]int
Types ¶
type Args ¶
type Args struct { PodResourceSocketPath string SleepInterval time.Duration Namespace string KubeletConfigFile string }
Args stores commandline arguments used for resource monitoring
type ContainerResources ¶
type ContainerResources struct { Name string Resources []ResourceInfo }
ContainerResources contains information about the node resources assigned to a container
type PodResources ¶
type PodResources struct { Name string Namespace string Containers []ContainerResources }
PodResources contains information about the node resources assigned to a pod
type PodResourcesScanner ¶
type PodResourcesScanner struct {
// contains filtered or unexported fields
}
func (*PodResourcesScanner) Scan ¶
func (resMon *PodResourcesScanner) Scan() ([]PodResources, error)
Scan gathers all the PodResources from the system, using the podresources API client.
type ResourceInfo ¶
type ResourceInfo struct { Name corev1.ResourceName Data []string NumaNodeIds []int }
ResourceInfo stores information of resources and their corresponding IDs obtained from PodResource API
type ResourcesAggregator ¶
type ResourcesAggregator interface {
Aggregate(podResData []PodResources) topologyv1alpha1.ZoneList
}
ResourcesAggregator aggregates resource information based on the received data from underlying hardware and podresource API
func NewResourcesAggregator ¶
func NewResourcesAggregator(podResourceClient podresourcesapi.PodResourcesListerClient) (ResourcesAggregator, error)
func NewResourcesAggregatorFromData ¶
func NewResourcesAggregatorFromData(topo *ghw.TopologyInfo, resp *podresourcesapi.AllocatableResourcesResponse, memoryResourceCapacity utils.NumaMemoryResources) ResourcesAggregator
NewResourcesAggregatorFromData is used to aggregate resource information based on the received data from underlying hardware and podresource API
type ResourcesScanner ¶
type ResourcesScanner interface {
Scan() ([]PodResources, error)
}
ResourcesScanner gathers all the PodResources from the system, using the podresources API client
func NewPodResourcesScanner ¶
func NewPodResourcesScanner(namespace string, podResourceClient podresourcesapi.PodResourcesListerClient, kubeApihelper apihelper.APIHelpers) (ResourcesScanner, error)
NewPodResourcesScanner creates a new ResourcesScanner instance