preemptionstore

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: 14 Imported by: 0

Documentation

Index

Constants

View Source
const Name commonstores.StoreName = "PreemptionStore"

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 PreemptionDetailForNode

type PreemptionDetailForNode struct {
	// 1. preemption items from pod's nominated node annotation and
	// 2. preemption items saved in scheduling process
	//    before updating nominated node in apiserver & deleting victims in apiserver
	VictimToPreemptors generationstore.Store
	Generation         int64
}

func NewCachePreemptionDetailForNode

func NewCachePreemptionDetailForNode() *PreemptionDetailForNode

func NewSnapshotPreemptionDetailForNode

func NewSnapshotPreemptionDetailForNode() *PreemptionDetailForNode

func (*PreemptionDetailForNode) AddPreemptItem

func (item *PreemptionDetailForNode) AddPreemptItem(victimKey, preemptorKey string)

func (*PreemptionDetailForNode) CleanUpResidualPreemptionItems

func (item *PreemptionDetailForNode) CleanUpResidualPreemptionItems(podLister corelister.PodLister)

func (*PreemptionDetailForNode) GetGeneration

func (item *PreemptionDetailForNode) GetGeneration() int64

func (*PreemptionDetailForNode) GetPreemptorsByVictim

func (item *PreemptionDetailForNode) GetPreemptorsByVictim(victimKey string) []string

func (*PreemptionDetailForNode) IsEmpty

func (item *PreemptionDetailForNode) IsEmpty() bool

func (*PreemptionDetailForNode) RemovePreemptItem

func (item *PreemptionDetailForNode) RemovePreemptItem(victimKey, preemptorKey string)

func (*PreemptionDetailForNode) SetGeneration

func (item *PreemptionDetailForNode) SetGeneration(g int64)

type PreemptionDetails

type PreemptionDetails struct {
	NodeToVictims generationstore.Store
}

func NewCachePreemptionDetails

func NewCachePreemptionDetails() *PreemptionDetails

func NewSnapshotPreemptionDetails

func NewSnapshotPreemptionDetails() *PreemptionDetails

func (*PreemptionDetails) AddPreemptItem

func (pDetail *PreemptionDetails) AddPreemptItem(nodeName, victimKey, preemptorKey string)

func (*PreemptionDetails) CleanUpResidualPreemptionItems

func (pDetail *PreemptionDetails) CleanUpResidualPreemptionItems(podLister corelister.PodLister)

func (*PreemptionDetails) GetPreemptorsByVictim

func (pDetail *PreemptionDetails) GetPreemptorsByVictim(nodeName, victimKey string) []string

func (*PreemptionDetails) RemovePreemptItem

func (pDetail *PreemptionDetails) RemovePreemptItem(nodeName, victimKey, preemptorKey string)

func (*PreemptionDetails) String

func (pDetail *PreemptionDetails) String() string

type PreemptionStore

type PreemptionStore struct {
	commonstores.BaseStore
	// contains filtered or unexported fields
}

-------------------------------------- PreemptionStore --------------------------------------

func (*PreemptionStore) AddPod

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

func (*PreemptionStore) AssumePod

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

func (*PreemptionStore) ForgetPod

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

func (*PreemptionStore) GetPreemptorsByVictim

func (s *PreemptionStore) GetPreemptorsByVictim(node, victim string) []string

func (*PreemptionStore) Name

func (*PreemptionStore) PeriodWorker

func (s *PreemptionStore) PeriodWorker(mu *sync.RWMutex)

func (*PreemptionStore) RemovePod

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

func (*PreemptionStore) UpdatePod

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

func (*PreemptionStore) UpdateSnapshot

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

Jump to

Keyboard shortcuts

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