testing

package
v1.1.0-alpha.1....-1f45cd0 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2017 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FakeCache

type FakeCache struct {
	AssumeFunc func(*v1.Pod)
	ForgetFunc func(*v1.Pod)
}

FakeCache is used for testing

func (*FakeCache) AddNode

func (f *FakeCache) AddNode(node *v1.Node) error

func (*FakeCache) AddPod

func (f *FakeCache) AddPod(pod *v1.Pod) error

func (*FakeCache) AssumePod

func (f *FakeCache) AssumePod(pod *v1.Pod) error

func (*FakeCache) FilteredList

func (f *FakeCache) FilteredList(filter schedulercache.PodFilter, selector labels.Selector) ([]*v1.Pod, error)

func (*FakeCache) FinishBinding

func (f *FakeCache) FinishBinding(pod *v1.Pod) error

func (*FakeCache) ForgetPod

func (f *FakeCache) ForgetPod(pod *v1.Pod) error

func (*FakeCache) List

func (f *FakeCache) List(s labels.Selector) ([]*v1.Pod, error)

func (*FakeCache) RemoveNode

func (f *FakeCache) RemoveNode(node *v1.Node) error

func (*FakeCache) RemovePod

func (f *FakeCache) RemovePod(pod *v1.Pod) error

func (*FakeCache) UpdateNode

func (f *FakeCache) UpdateNode(oldNode, newNode *v1.Node) error

func (*FakeCache) UpdateNodeNameToInfoMap

func (f *FakeCache) UpdateNodeNameToInfoMap(infoMap map[string]*schedulercache.NodeInfo) error

func (*FakeCache) UpdatePod

func (f *FakeCache) UpdatePod(oldPod, newPod *v1.Pod) error

type FakeControllerLister

type FakeControllerLister []*v1.ReplicationController

FakeControllerLister implements ControllerLister on []v1.ReplicationController for test purposes.

func (FakeControllerLister) GetPodControllers

func (f FakeControllerLister) GetPodControllers(pod *v1.Pod) (controllers []*v1.ReplicationController, err error)

GetPodControllers gets the ReplicationControllers that have the selector that match the labels on the given pod

func (FakeControllerLister) List

List returns []v1.ReplicationController, the list of all ReplicationControllers.

type FakeNodeLister

type FakeNodeLister []*v1.Node

FakeNodeLister implements NodeLister on a []string for test purposes.

func (FakeNodeLister) List

func (f FakeNodeLister) List() ([]*v1.Node, error)

List returns nodes as a []string.

type FakePodLister

type FakePodLister []*v1.Pod

FakePodLister implements PodLister on an []v1.Pods for test purposes.

func (FakePodLister) FilteredList

func (f FakePodLister) FilteredList(podFilter schedulercache.PodFilter, s labels.Selector) (selected []*v1.Pod, err error)

func (FakePodLister) List

func (f FakePodLister) List(s labels.Selector) (selected []*v1.Pod, err error)

List returns []*v1.Pod matching a query.

type FakeReplicaSetLister

type FakeReplicaSetLister []*extensions.ReplicaSet

FakeReplicaSetLister implements ControllerLister on []extensions.ReplicaSet for test purposes.

func (FakeReplicaSetLister) GetPodReplicaSets

func (f FakeReplicaSetLister) GetPodReplicaSets(pod *v1.Pod) (rss []*extensions.ReplicaSet, err error)

GetPodReplicaSets gets the ReplicaSets that have the selector that match the labels on the given pod

type FakeServiceLister

type FakeServiceLister []*v1.Service

FakeServiceLister implements ServiceLister on []v1.Service for test purposes.

func (FakeServiceLister) GetPodServices

func (f FakeServiceLister) GetPodServices(pod *v1.Pod) (services []*v1.Service, err error)

GetPodServices gets the services that have the selector that match the labels on the given pod.

func (FakeServiceLister) List

List returns v1.ServiceList, the list of all services.

type FakeStatefulSetLister

type FakeStatefulSetLister []*apps.StatefulSet

FakeStatefulSetLister implements ControllerLister on []apps.StatefulSet for testing purposes.

func (FakeStatefulSetLister) GetPodStatefulSets

func (f FakeStatefulSetLister) GetPodStatefulSets(pod *v1.Pod) (sss []*apps.StatefulSet, err error)

GetPodStatefulSets gets the StatefulSets that have the selector that match the labels on the given pod.

type PodsToCache

type PodsToCache []*v1.Pod

PodsToCache is used for testing

func (PodsToCache) AddNode

func (p PodsToCache) AddNode(node *v1.Node) error

func (PodsToCache) AddPod

func (p PodsToCache) AddPod(pod *v1.Pod) error

func (PodsToCache) AssumePod

func (p PodsToCache) AssumePod(pod *v1.Pod) error

func (PodsToCache) ForgetPod

func (p PodsToCache) ForgetPod(pod *v1.Pod) error

func (PodsToCache) List

func (p PodsToCache) List(s labels.Selector) (selected []*v1.Pod, err error)

func (PodsToCache) RemoveNode

func (p PodsToCache) RemoveNode(node *v1.Node) error

func (PodsToCache) RemovePod

func (p PodsToCache) RemovePod(pod *v1.Pod) error

func (PodsToCache) UpdateNode

func (p PodsToCache) UpdateNode(oldNode, newNode *v1.Node) error

func (PodsToCache) UpdateNodeNameToInfoMap

func (p PodsToCache) UpdateNodeNameToInfoMap(infoMap map[string]*schedulercache.NodeInfo) error

func (PodsToCache) UpdatePod

func (p PodsToCache) UpdatePod(oldPod, newPod *v1.Pod) error

Jump to

Keyboard shortcuts

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