Documentation ¶
Index ¶
- func GenerateNumaTopologyStatus(socketStatusMap map[int]*nodev1alpha1.SocketStatus, ...) *nodev1alpha1.TopologyStatus
- func GenerateSocketStatus(numaCapacity map[int]*v1.ResourceList, ...) map[int]*nodev1alpha1.SocketStatus
- func GetNumaToSocketMap(nodes []info.Node) map[int]int
- type Adapter
- type DummyAdapter
- type NumaInfoGetter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateNumaTopologyStatus ¶
func GenerateNumaTopologyStatus( socketStatusMap map[int]*nodev1alpha1.SocketStatus, numaStatusMap map[int]*nodev1alpha1.NumaStatus, ) *nodev1alpha1.TopologyStatus
GenerateNumaTopologyStatus generate numa topology status by merging socket status and numa status according to the numa id, and sort them to get stable result at the end.
func GenerateSocketStatus ¶
func GenerateSocketStatus( numaCapacity map[int]*v1.ResourceList, numaAllocatable map[int]*v1.ResourceList, numa2socket map[int]int, ) map[int]*nodev1alpha1.SocketStatus
GenerateSocketStatus generate a map of socket id to socket status, which includes numa id and numa capacity of each socket.
Types ¶
type Adapter ¶
type Adapter interface { // GetNumaTopologyStatus return newest numa topology status GetNumaTopologyStatus(ctx context.Context) (*nodev1alpha1.TopologyStatus, error) // Run start Adapter with stop and notify channel Run(ctx context.Context, notify chan struct{}) error }
Adapter is to get numa topology status, the src of that can be kubelet checkpoint file or pod resource api in the future.
func NewPodResourcesServerTopologyAdapter ¶
func NewPodResourcesServerTopologyAdapter(metaServer *metaserver.MetaServer, endpoints []string, skipNumaAllocatableDeviceNames sets.String, numaInfoGetter NumaInfoGetter, podNumaBindingFilter func(*v1.Pod) bool, getClientFunc podresources.GetClientFunc) (Adapter, error)
NewPodResourcesServerTopologyAdapter creates a topology adapter which uses pod resources server
type DummyAdapter ¶
type DummyAdapter struct{}
DummyAdapter is a dummy topology adapter for test
func (DummyAdapter) GetNumaTopologyStatus ¶
func (d DummyAdapter) GetNumaTopologyStatus(ctx context.Context) (*nodev1alpha1.TopologyStatus, error)
GetNumaTopologyStatus is to get dummy numa topology status
type NumaInfoGetter ¶
NumaInfoGetter is to get numa info