Documentation ¶
Index ¶
- Constants
- func NewCache(handler handler.CacheHandler) commonstores.CommonStore
- func NewSnapshot(handler handler.CacheHandler) commonstores.CommonStore
- type LoadAwareStore
- func (s *LoadAwareStore) AddCNR(cnr *katalystv1alpha1.CustomNodeResource) error
- func (s *LoadAwareStore) AddPod(pod *v1.Pod) error
- func (s *LoadAwareStore) AssumePod(podInfo *framework.CachePodInfo) error
- func (s *LoadAwareStore) ForgetPod(podInfo *framework.CachePodInfo) error
- func (s *LoadAwareStore) GetLoadAwareNodeMetricInfo(nodeName string, resourceType podutil.PodResourceType) *framework.LoadAwareNodeMetricInfo
- func (s *LoadAwareStore) GetLoadAwareNodeUsage(nodeName string, resourceType podutil.PodResourceType) *framework.LoadAwareNodeUsage
- func (c *LoadAwareStore) Name() commonstores.StoreName
- func (s *LoadAwareStore) RemoveCNR(cnr *katalystv1alpha1.CustomNodeResource) error
- func (s *LoadAwareStore) RemovePod(pod *v1.Pod) error
- func (s *LoadAwareStore) UpdateCNR(oldCNR, newCNR *katalystv1alpha1.CustomNodeResource) error
- func (s *LoadAwareStore) UpdatePod(oldPod *v1.Pod, newPod *v1.Pod) error
- func (s *LoadAwareStore) UpdateSnapshot(store commonstores.CommonStore) error
- type NodeMetricInfo
- func (i *NodeMetricInfo) CanBeRecycle() bool
- func (i *NodeMetricInfo) Clone() *NodeMetricInfo
- func (i *NodeMetricInfo) GetGeneration() int64
- func (i *NodeMetricInfo) PodOp(pInfo *podBasicInfo, isCacheStore, isAdd bool)
- func (i *NodeMetricInfo) Reset(cnr *katalystv1alpha1.CustomNodeResource)
- func (i *NodeMetricInfo) SetGeneration(generation int64)
- type PodMetricInfos
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 (s *LoadAwareStore) AddCNR(cnr *katalystv1alpha1.CustomNodeResource) 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 (c *LoadAwareStore) Name() commonstores.StoreName
func (*LoadAwareStore) RemoveCNR ¶
func (s *LoadAwareStore) RemoveCNR(cnr *katalystv1alpha1.CustomNodeResource) error
func (*LoadAwareStore) UpdateCNR ¶
func (s *LoadAwareStore) UpdateCNR(oldCNR, newCNR *katalystv1alpha1.CustomNodeResource) 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 (i *NodeMetricInfo) Reset(cnr *katalystv1alpha1.CustomNodeResource)
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
Click to show internal directories.
Click to hide internal directories.