fake

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2019 License: Apache-2.0 Imports: 5 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
	GetPodFunc       func(*v1.Pod) *v1.Pod
}

Cache is used for testing

func (*Cache) AddNode

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

AddNode is a fake method for testing.

func (*Cache) AddPod

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

AddPod is a fake method for testing.

func (*Cache) AddPool

func (c *Cache) AddPool(pool *v1alpha1.Pool) error

func (*Cache) AssumePod

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

AssumePod is a fake method for testing.

func (*Cache) BorrowPool added in v0.1.3

func (c *Cache) BorrowPool(fromPoolName string, pod *v1.Pod) string

func (*Cache) DeserveAllPools

func (c *Cache) DeserveAllPools() error

func (*Cache) FilteredList

func (c *Cache) FilteredList(filter algorithm.PodFilter, selector labels.Selector) ([]*v1.Pod, error)

FilteredList is a fake method for testing.

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(pod *v1.Pod) error

ForgetPod is a fake method for testing.

func (*Cache) GetPod

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

GetPod is a fake method for testing.

func (*Cache) GetPool

func (c *Cache) GetPool(poolName string) (*info.PoolInfo, error)

func (*Cache) GetPoolContainsNode

func (c *Cache) GetPoolContainsNode(nodeName string) *info.PoolInfo

func (*Cache) IsAssumedPod

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

IsAssumedPod is a fake method for testing.

func (*Cache) List

func (c *Cache) List(s labels.Selector) ([]*v1.Pod, error)

List is a fake method for testing.

func (*Cache) Metrics added in v0.2.4

func (c *Cache) Metrics()

func (*Cache) NodeInfoSnapshot

func (c *Cache) NodeInfoSnapshot(poolName string) *info.NodeInfoSnapshot

func (*Cache) NodeTree

func (c *Cache) NodeTree(poolName string) *info.NodeTree

NodeTree is a fake method for testing.

func (*Cache) NumNodes

func (c *Cache) NumNodes() int

func (*Cache) NumPools

func (c *Cache) NumPools() int

func (*Cache) Pools

func (c *Cache) Pools() map[string]*info.PoolInfo

func (*Cache) RemoveNode

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

RemoveNode is a fake method for testing.

func (*Cache) RemovePod

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

RemovePod is a fake method for testing.

func (*Cache) RemovePool

func (c *Cache) RemovePool(pool *v1alpha1.Pool) error

func (*Cache) Snapshot

func (c *Cache) Snapshot() *info.Snapshot

Snapshot is a fake method for testing

func (*Cache) TotalAllocatableResource

func (c *Cache) TotalAllocatableResource() *info.Resource

func (*Cache) UpdateNode

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

UpdateNode is a fake method for testing.

func (*Cache) UpdateNodeInfoSnapshot

func (c *Cache) UpdateNodeInfoSnapshot(poolName string) error

UpdateNodeInfoSnapshot is a fake method for testing.

func (*Cache) UpdatePod

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

UpdatePod is a fake method for testing.

func (*Cache) UpdatePool

func (c *Cache) UpdatePool(oldPool, newPool *v1alpha1.Pool) error

Jump to

Keyboard shortcuts

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