listers

package
v1.18.3-beta.0 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetPodServices added in v1.18.0

func GetPodServices(serviceLister v1listers.ServiceLister, pod *v1.Pod) ([]*v1.Service, error)

GetPodServices gets the services that have the selector that match the labels on the given pod. TODO: this should be moved to ServiceAffinity plugin once that plugin is ready.

Types

type NodeInfoLister

type NodeInfoLister interface {
	// Returns the list of NodeInfos.
	List() ([]*schedulernodeinfo.NodeInfo, error)
	// Returns the list of NodeInfos of nodes with pods with affinity terms.
	HavePodsWithAffinityList() ([]*schedulernodeinfo.NodeInfo, error)
	// Returns the NodeInfo of the given node name.
	Get(nodeName string) (*schedulernodeinfo.NodeInfo, error)
}

NodeInfoLister interface represents anything that can list/get NodeInfo objects from node name.

type PodFilter

type PodFilter func(*v1.Pod) bool

PodFilter is a function to filter a pod. If pod passed return true else return false.

type PodLister

type PodLister interface {
	// Returns the list of pods.
	List(labels.Selector) ([]*v1.Pod, error)
	// This is similar to "List()", but the returned slice does not
	// contain pods that don't pass `podFilter`.
	FilteredList(podFilter PodFilter, selector labels.Selector) ([]*v1.Pod, error)
}

PodLister interface represents anything that can list pods for a scheduler.

type SharedLister

type SharedLister interface {
	Pods() PodLister
	NodeInfos() NodeInfoLister
}

SharedLister groups scheduler-specific listers.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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