package fake

import "k8s.io/kubernetes/pkg/scheduler/backend/cache/fake"

Index

Types

type Cache

type Cache struct {
	internalcache.Cache
	AssumeFunc       func(*v1.Pod)
	ForgetFunc       func(*v1.Pod)
	IsAssumedPodFunc func(*v1.Pod) bool
	GetPodFunc       func(*v1.Pod) *v1.Pod
}

Cache is used for testing

func (*Cache) AssumePod

func (c *Cache) AssumePod(logger klog.Logger, pod *v1.Pod) error

AssumePod allows to mock this method for testing.

func (*Cache) ForgetPod

func (c *Cache) ForgetPod(logger klog.Logger, pod *v1.Pod) error

ForgetPod allows to mock this method for testing.

func (*Cache) GetPod

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

GetPod allows to mock this method for testing.

func (*Cache) IsAssumedPod

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

IsAssumedPod allows to mock this method for testing.

Source Files

fake_cache.go

Version
v1.34.0-rc.0
Published
Aug 6, 2025
Platform
linux/amd64
Imports
3 packages
Last checked
33 seconds ago

Tools for package owners.