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)
	ForgetFunc       func(*v1.Pod)
	IsAssumedPodFunc func(*v1.Pod) bool
	IsCachedPodFunc  func(*v1.Pod) bool
	GetPodFunc       func(*v1.Pod) *v1.Pod
	UnitStatus       *unitstatus.UnitStatusMap
}

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(nmDode *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, ownerKey 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) CacheAscendingOrderNodesForPodOwner

func (c *Cache) CacheAscendingOrderNodesForPodOwner(podOwner string, nodeGroup string, nodeNames []string) error

func (*Cache) CacheNodeForPodOwner

func (c *Cache) CacheNodeForPodOwner(podOwner string, nodeName string, nodeGroup string) error

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) DeleteNodeForPodOwner

func (c *Cache) DeleteNodeForPodOwner(podOwner string, nodeName string) error

DeleteNodeForPodOwner deletes node from cached nodes

func (*Cache) DeleteOwner

func (c *Cache) DeleteOwner(ownerType, ownerKey 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

func (*Cache) FinishReserving

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

FinishReserving 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) GetOrderedNodesForPodOwner

func (c *Cache) GetOrderedNodesForPodOwner(podOwner string) []string

GetOrderedNodesForPodOwner gets ordered nodes from cached nodes

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) GetUnitSchedulingStatus

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

func (*Cache) GetUnitStatus

func (cache *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) IsCachedPod

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

IsCachedPod is a fake method for testing.

func (*Cache) IsNodeInCachedMap

func (c *Cache) IsNodeInCachedMap(podOwner string, nodeName string) (bool, string)

IsNodeInCachedMap checks if the node is still in cached nodes

func (*Cache) NodeInThisPartition

func (c *Cache) NodeInThisPartition(nodeName string) bool

func (*Cache) PodCount

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

PodCount is a fake method for testing.

func (*Cache) ScrapeCollectable

func (c *Cache) ScrapeCollectable(_ generationstore.RawStore)

func (*Cache) SetNodeInPartition

func (c *Cache) SetNodeInPartition(nodeName string) error

SetNodeInPartition sets node in partition of scheduler

func (*Cache) SetNodeOutOfPartition

func (c *Cache) SetNodeOutOfPartition(nodeName string) error

SetNodeOutOfPartition sets node out of partition of scheduler

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, ownerKey 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

func (*Cache) UpdateSnapshot

func (c *Cache) UpdateSnapshot(snapshot *godelcache.Snapshot) error

UpdateSnapshot is a fake method for testing.

Jump to

Keyboard shortcuts

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