move scheduler cache ListNodes interface to snapshot

This commit is contained in:
Abdullah Gharaibeh
2019-10-14 17:47:42 -04:00
parent 34db57b007
commit e073e56095
9 changed files with 26 additions and 48 deletions

View File

@@ -30,13 +30,6 @@ var NodeFieldSelectorKeys = map[string]func(*v1.Node) string{
schedulerapi.NodeFieldSelectorKeyNodeName: func(n *v1.Node) string { return n.Name },
}
// NodeLister interface represents anything that can list nodes for a scheduler.
type NodeLister interface {
// We explicitly return []*v1.Node, instead of v1.NodeList, to avoid
// performing expensive copies that are unneeded.
ListNodes() []*v1.Node
}
// PodFilter is a function to filter a pod. If pod passed return true else return false.
type PodFilter func(*v1.Pod) bool