loadawarestore

package
v0.0.0-...-dcfb068 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const Name commonstores.StoreName = "LoadAwareStore"

Variables

This section is empty.

Functions

func NewCache

func NewCache(handler handler.CacheHandler) commonstores.CommonStore

func NewSnapshot

func NewSnapshot(handler handler.CacheHandler) commonstores.CommonStore

Types

type LoadAwareStore

type LoadAwareStore struct {
	commonstores.BaseStore

	// NodeMetricInfo
	Store generationstore.Store
	// contains filtered or unexported fields
}

LoadAwareStore implementing the CommonStore interface.

func (*LoadAwareStore) AddCNR

func (*LoadAwareStore) AddPod

func (s *LoadAwareStore) AddPod(pod *v1.Pod) error

func (*LoadAwareStore) AssumePod

func (s *LoadAwareStore) AssumePod(podInfo *framework.CachePodInfo) error

func (*LoadAwareStore) ForgetPod

func (s *LoadAwareStore) ForgetPod(podInfo *framework.CachePodInfo) error

func (*LoadAwareStore) GetLoadAwareNodeMetricInfo

func (s *LoadAwareStore) GetLoadAwareNodeMetricInfo(nodeName string, resourceType podutil.PodResourceType) *framework.LoadAwareNodeMetricInfo

func (*LoadAwareStore) GetLoadAwareNodeUsage

func (s *LoadAwareStore) GetLoadAwareNodeUsage(nodeName string, resourceType podutil.PodResourceType) *framework.LoadAwareNodeUsage

func (*LoadAwareStore) Name

func (*LoadAwareStore) RemoveCNR

func (*LoadAwareStore) RemovePod

func (s *LoadAwareStore) RemovePod(pod *v1.Pod) error

func (*LoadAwareStore) UpdateCNR

func (s *LoadAwareStore) UpdateCNR(oldCNR, newCNR *katalystv1alpha1.CustomNodeResource) error

func (*LoadAwareStore) UpdatePod

func (s *LoadAwareStore) UpdatePod(oldPod *v1.Pod, newPod *v1.Pod) error

func (*LoadAwareStore) UpdateSnapshot

func (s *LoadAwareStore) UpdateSnapshot(store commonstores.CommonStore) error

UpdateSnapshot synchronize the data in the Cache to Snapshot, generally using generationstore for incremental updates.

type NodeMetricInfo

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

ATTENTION: the NodeMetricInfo's lifecycle is accompanied by CNR, not CNR.Status.NodeMetricStatus

func NewNodeMetricInfo

func NewNodeMetricInfo(nodeName string, cnr *katalystv1alpha1.CustomNodeResource) *NodeMetricInfo

func (*NodeMetricInfo) CanBeRecycle

func (i *NodeMetricInfo) CanBeRecycle() bool

func (*NodeMetricInfo) Clone

func (i *NodeMetricInfo) Clone() *NodeMetricInfo

func (*NodeMetricInfo) GetGeneration

func (i *NodeMetricInfo) GetGeneration() int64

func (*NodeMetricInfo) PodOp

func (i *NodeMetricInfo) PodOp(pInfo *podBasicInfo, isCacheStore, isAdd bool)

func (*NodeMetricInfo) Reset

func (*NodeMetricInfo) SetGeneration

func (i *NodeMetricInfo) SetGeneration(generation int64)

type PodMetricInfos

type PodMetricInfos struct {
	ProfileMilliCPU, ProfileMEM int64
	RequestMilliCPU, RequestMEM int64
	ProfilePods                 sets.String
}

func (*PodMetricInfos) Clone

func (i *PodMetricInfos) Clone() *PodMetricInfos

Jump to

Keyboard shortcuts

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