fake

package
v0.0.0-...-e52b029 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

type Cache struct {
	AssumeFunc                        func(*v1.Pod) error
	ForgetFunc                        func(*v1.Pod)
	IsAssumedPodFunc                  func(*v1.Pod) bool
	GetPodFunc                        func(*v1.Pod) *v1.Pod
	GetNodeInfoFunc                   func(string) framework.NodeInfo
	GetAvailablePlaceholderFunc       func(pod *v1.Pod) (*v1.Pod, error)
	FindReservationPlaceHolderPodFunc func(pod *v1.Pod) (*v1.Pod, error)
}

BinderCache is used for testing

func (*Cache) AddCNR

AddCNR adds custom resource information about node

func (*Cache) AddMovement

func (c *Cache) AddMovement(movement *schedulingv1a1.Movement) error

func (*Cache) AddNMNode

func (c *Cache) AddNMNode(nmNode *nodev1alpha1.NMNode) error

AddNMNode is a fake method for testing.

func (*Cache) AddNode

func (c *Cache) AddNode(node *v1.Node) error

AddNode is a fake method for testing.

func (*Cache) AddNonTerminatingPodToQuota

func (c *Cache) AddNonTerminatingPodToQuota(pod *v1.Pod, queueName, schedulerName string) error

func (*Cache) AddOwner

func (c *Cache) AddOwner(ownerType, key string, labels map[string]string) error

func (*Cache) AddPDB

func (c *Cache) AddPDB(pdb *policy.PodDisruptionBudget) error

func (*Cache) AddPod

func (c *Cache) AddPod(pod *v1.Pod) error

AddPod is a fake method for testing.

func (*Cache) AddPodGroup

func (c *Cache) AddPodGroup(podGroup *schedulingv1a1.PodGroup) error

func (*Cache) AddReservation

func (c *Cache) AddReservation(request *schedulingv1a1.Reservation) error

func (*Cache) AssumePod

func (c *Cache) AssumePod(podInfo *framework.CachePodInfo) error

AssumePod is a fake method for testing.

func (*Cache) CheckIfVictimExist

func (c *Cache) CheckIfVictimExist(deployNamespace, deployName, victimUID string) bool

func (*Cache) DeleteCNR

func (c *Cache) DeleteCNR(cnr *katalystv1alpha1.CustomNodeResource) error

DeleteCNR removes custom resource information about node.

func (*Cache) DeleteMovement

func (c *Cache) DeleteMovement(movement *schedulingv1a1.Movement) error

func (*Cache) DeleteNMNode

func (c *Cache) DeleteNMNode(nmNode *nodev1alpha1.NMNode) error

DeleteNMNode is a fake method for testing.

func (*Cache) DeleteNode

func (c *Cache) DeleteNode(node *v1.Node) error

DeleteNode is a fake method for testing.

func (*Cache) DeleteOwner

func (c *Cache) DeleteOwner(ownerType, key string) error

func (*Cache) DeletePDB

func (c *Cache) DeletePDB(pdb *policy.PodDisruptionBudget) error

func (*Cache) DeletePod

func (c *Cache) DeletePod(pod *v1.Pod) error

DeletePod is a fake method for testing.

func (*Cache) DeletePodFromQuota

func (c *Cache) DeletePodFromQuota(pod *v1.Pod) error

func (*Cache) DeletePodGroup

func (c *Cache) DeletePodGroup(podGroup *schedulingv1a1.PodGroup) error

func (*Cache) DeleteReservation

func (c *Cache) DeleteReservation(request *schedulingv1a1.Reservation) error

func (*Cache) Dump

func (c *Cache) Dump() *commoncache.Dump

Dump is a fake method for testing.

func (*Cache) FindReservationPlaceHolderPod

func (c *Cache) FindReservationPlaceHolderPod(
	pod *v1.Pod,
) (*v1.Pod, error)

func (*Cache) FindStore

func (c *Cache) FindStore(storeName commonstore.StoreName) commonstore.Store

func (*Cache) FinishBinding

func (c *Cache) FinishBinding(pod *v1.Pod) error

FinishBinding is a fake method for testing.

func (*Cache) ForgetPod

func (c *Cache) ForgetPod(podInfo *framework.CachePodInfo) error

ForgetPod is a fake method for testing.

func (*Cache) GetAvailablePlaceholderPod

func (c *Cache) GetAvailablePlaceholderPod(
	pod *v1.Pod,
) (*v1.Pod, error)

func (*Cache) GetNodeInfo

func (c *Cache) GetNodeInfo(nodename string) framework.NodeInfo

func (*Cache) GetPDBItemList

func (c *Cache) GetPDBItemList() []framework.PDBItem

func (*Cache) GetPod

func (c *Cache) GetPod(pod *v1.Pod) (*v1.Pod, error)

GetPod is a fake method for testing.

func (*Cache) GetPodGroupInfo

func (c *Cache) GetPodGroupInfo(podGroupName string) (*schedulingv1a1.PodGroup, error)

func (*Cache) GetUnitSchedulingStatus

func (c *Cache) GetUnitSchedulingStatus(unitKey string) unitstatus.SchedulingStatus

func (*Cache) GetUnitStatus

func (c *Cache) GetUnitStatus(unitKey string) unitstatus.UnitStatus

func (*Cache) IsAssumedPod

func (c *Cache) IsAssumedPod(pod *v1.Pod) (bool, error)

IsAssumedPod is a fake method for testing.

func (*Cache) IsPodMarkedToDelete

func (c *Cache) IsPodMarkedToDelete(pod *v1.Pod) (bool, error)

func (*Cache) MarkPodToDelete

func (c *Cache) MarkPodToDelete(pod, preemptor *v1.Pod) error

func (*Cache) PodCount

func (c *Cache) PodCount() (int, error)

PodCount is a fake method for testing.

func (*Cache) RemoveDeletePodMarker

func (c *Cache) RemoveDeletePodMarker(po, preemptor *v1.Pod) error

func (*Cache) RemoveDeletePodMarkerByKey

func (c *Cache) RemoveDeletePodMarkerByKey(podKey, preemptorKey string) error

func (*Cache) SetUnitSchedulingStatus

func (c *Cache) SetUnitSchedulingStatus(unitKey string, status unitstatus.SchedulingStatus)

func (*Cache) UpdateCNR

func (c *Cache) UpdateCNR(oldCNR, newCNR *katalystv1alpha1.CustomNodeResource) error

UpdateCNR updates custom resource information about node.

func (*Cache) UpdateMovement

func (c *Cache) UpdateMovement(oldMovement, newMovement *schedulingv1a1.Movement) error

func (*Cache) UpdateNMNode

func (c *Cache) UpdateNMNode(oldNMNode, newNMNode *nodev1alpha1.NMNode) error

UpdateNMNode is a fake method for testing.

func (*Cache) UpdateNode

func (c *Cache) UpdateNode(oldNode, newNode *v1.Node) error

UpdateNode is a fake method for testing.

func (*Cache) UpdateNonTerminatingPodInQuota

func (c *Cache) UpdateNonTerminatingPodInQuota(oldPod, newPod *v1.Pod, newQueueName, schedulerName string) error

func (*Cache) UpdateOwner

func (c *Cache) UpdateOwner(ownerType, key string, oldLabels, newLabels map[string]string) error

func (*Cache) UpdatePDB

func (c *Cache) UpdatePDB(oldPdb, newPdb *policy.PodDisruptionBudget) error

func (*Cache) UpdatePod

func (c *Cache) UpdatePod(oldPod, newPod *v1.Pod) error

UpdatePod is a fake method for testing.

func (*Cache) UpdatePodGroup

func (c *Cache) UpdatePodGroup(oldPodGroup, newPodGroup *schedulingv1a1.PodGroup) error

func (*Cache) UpdateReservation

func (c *Cache) UpdateReservation(oldRequest, newRequest *schedulingv1a1.Reservation) error

Jump to

Keyboard shortcuts

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