finder

package
v0.0.0-...-2350393 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2020 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// obtained these values from node e2e tests : https://github.com/kubernetes/kubernetes/blob/82baa26905c94398a0d19e1b1ecf54eb8acb6029/test/e2e_node/util.go#L70
	PathDevsSysCPU  = "devices/system/cpu"
	PathDevsSysNode = "devices/system/node"
)

Variables

This section is empty.

Functions

func Aggregate

func Aggregate(podResData []PodResources, nodeResourceData *NodeResources) v1alpha1.ZoneMap

Types

type Args

type Args struct {
	Source                string
	PodResourceSocketPath string
	SleepInterval         time.Duration
	Namespace             string
	SysfsRoot             string
	KubeletConfigFile     string
}

type ContainerResources

type ContainerResources struct {
	Name      string
	Resources []ResourceInfo
}

type Finder

type Finder interface {
	Scan(map[string]string) ([]PodResources, error)
}

func NewPodResourceFinder

func NewPodResourceFinder(args Args, podResourceClient podresourcesapi.PodResourcesListerClient) (Finder, error)

type NodeResources

type NodeResources struct {
	CPUs          []int64
	NUMANode2CPUs map[int][]int
	// contains filtered or unexported fields
}

func NewNodeResources

func NewNodeResources(sysfs string, podResourceClient podresourcesapi.PodResourcesListerClient) (*NodeResources, error)

func (*NodeResources) GetDeviceResourceMap

func (n *NodeResources) GetDeviceResourceMap() map[string]string

type PodResourceFinder

type PodResourceFinder struct {
	// contains filtered or unexported fields
}

func (*PodResourceFinder) Scan

func (f *PodResourceFinder) Scan(deviceID2ResourceMap map[string]string) ([]PodResources, error)

type PodResources

type PodResources struct {
	Name       string
	Namespace  string
	Containers []ContainerResources
}

type ResourceData

type ResourceData struct {
	// contains filtered or unexported fields
}

type ResourceInfo

type ResourceInfo struct {
	Name v1.ResourceName
	Data []string
}

Jump to

Keyboard shortcuts

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