kubernetes: k8s.io/kubernetes/pkg/scheduler/listers/fake Index | Files

package fake

import "k8s.io/kubernetes/pkg/scheduler/listers/fake"

Index

Package Files

listers.go

func NewNodeInfoLister Uses

func NewNodeInfoLister(nodes []*v1.Node) schedulerlisters.NodeInfoLister

NewNodeInfoLister create a new fake NodeInfoLister from a slice of v1.Nodes.

type CSINodeLister Uses

type CSINodeLister storagev1.CSINode

CSINodeLister declares a storagev1.CSINode type for testing.

func (CSINodeLister) Get Uses

func (n CSINodeLister) Get(name string) (*storagev1.CSINode, error)

Get returns a fake CSINode object.

func (CSINodeLister) List Uses

func (n CSINodeLister) List(selector labels.Selector) (ret []*storagev1.CSINode, err error)

List lists all CSINodes in the indexer.

type ControllerLister Uses

type ControllerLister []*v1.ReplicationController

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

func (ControllerLister) GetPodControllers Uses

func (f ControllerLister) 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 (ControllerLister) List Uses

func (f ControllerLister) List(labels.Selector) ([]*v1.ReplicationController, error)

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

func (ControllerLister) ReplicationControllers Uses

func (f ControllerLister) ReplicationControllers(namespace string) corelisters.ReplicationControllerNamespaceLister

ReplicationControllers returns nil

type NodeInfoLister Uses

type NodeInfoLister []*schedulertypes.NodeInfo

NodeInfoLister declares a schedulertypes.NodeInfo type for testing.

func (NodeInfoLister) Get Uses

func (nodes NodeInfoLister) Get(nodeName string) (*schedulertypes.NodeInfo, error)

Get returns a fake node object in the fake nodes.

func (NodeInfoLister) HavePodsWithAffinityList Uses

func (nodes NodeInfoLister) HavePodsWithAffinityList() ([]*schedulertypes.NodeInfo, error)

HavePodsWithAffinityList is supposed to list nodes with at least one pod with affinity. For the fake lister we just return everything.

func (NodeInfoLister) List Uses

func (nodes NodeInfoLister) List() ([]*schedulertypes.NodeInfo, error)

List lists all nodes.

type PersistentVolumeClaimLister Uses

type PersistentVolumeClaimLister []v1.PersistentVolumeClaim

PersistentVolumeClaimLister declares a []v1.PersistentVolumeClaim type for testing.

func (PersistentVolumeClaimLister) List Uses

func (pvcs PersistentVolumeClaimLister) List(selector labels.Selector) (ret []*v1.PersistentVolumeClaim, err error)

List gets PVC matching the namespace and PVC ID.

func (PersistentVolumeClaimLister) PersistentVolumeClaims Uses

func (pvcs PersistentVolumeClaimLister) PersistentVolumeClaims(namespace string) corelisters.PersistentVolumeClaimNamespaceLister

PersistentVolumeClaims returns a fake PersistentVolumeClaimLister object.

type PersistentVolumeLister Uses

type PersistentVolumeLister []v1.PersistentVolume

PersistentVolumeLister declares a []v1.PersistentVolume type for testing.

func (PersistentVolumeLister) Get Uses

func (pvs PersistentVolumeLister) Get(pvID string) (*v1.PersistentVolume, error)

Get returns a fake PV object in the fake PVs by PV ID.

func (PersistentVolumeLister) List Uses

func (pvs PersistentVolumeLister) List(selector labels.Selector) ([]*v1.PersistentVolume, error)

List lists all PersistentVolumes in the indexer.

type PodLister Uses

type PodLister []*v1.Pod

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

func (PodLister) FilteredList Uses

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

FilteredList returns pods matching a pod filter and a label selector.

func (PodLister) List Uses

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

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

type ReplicaSetLister Uses

type ReplicaSetLister []*appsv1.ReplicaSet

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

func (ReplicaSetLister) GetPodReplicaSets Uses

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

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

func (ReplicaSetLister) List Uses

func (f ReplicaSetLister) List(labels.Selector) ([]*appsv1.ReplicaSet, error)

List returns replica sets.

func (ReplicaSetLister) ReplicaSets Uses

func (f ReplicaSetLister) ReplicaSets(namespace string) appslisters.ReplicaSetNamespaceLister

ReplicaSets returns nil

type ServiceLister Uses

type ServiceLister []*v1.Service

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

func (ServiceLister) List Uses

func (f ServiceLister) List(labels.Selector) ([]*v1.Service, error)

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

func (ServiceLister) Services Uses

func (f ServiceLister) Services(namespace string) corelisters.ServiceNamespaceLister

Services returns nil.

type StatefulSetLister Uses

type StatefulSetLister []*appsv1.StatefulSet

StatefulSetLister implements ControllerLister on []appsv1.StatefulSet for testing purposes.

func (StatefulSetLister) GetPodStatefulSets Uses

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

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

func (StatefulSetLister) List Uses

func (f StatefulSetLister) List(labels.Selector) ([]*appsv1.StatefulSet, error)

List returns stateful sets.

func (StatefulSetLister) StatefulSets Uses

func (f StatefulSetLister) StatefulSets(namespace string) appslisters.StatefulSetNamespaceLister

StatefulSets returns nil

type StorageClassLister Uses

type StorageClassLister []storagev1.StorageClass

StorageClassLister declares a []storagev1.StorageClass type for testing.

func (StorageClassLister) Get Uses

func (classes StorageClassLister) Get(name string) (*storagev1.StorageClass, error)

Get returns a fake storage class object in the fake storage classes by name.

func (StorageClassLister) List Uses

func (classes StorageClassLister) List(selector labels.Selector) ([]*storagev1.StorageClass, error)

List lists all StorageClass in the indexer.

Package fake imports 11 packages (graph). Updated 2020-04-07. Refresh now. Tools for package owners.