algorithm

package
v0.0.0-...-aa771b6 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2020 License: Apache-2.0 Imports: 2 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Filter

type Filter interface {
	Filter(pod *v1.Pod, nodes []string) ([]string, error)
}

Filter filters nodes based on pod's spec, it returns valid nodes that the pod is okay to run on.

type Filters

type Filters []Filter

Filters is an ordered list of Filters

func (Filters) Filter

func (filters Filters) Filter(pod *v1.Pod, nodes []string) ([]string, error)

Filter implements interface Filter

type HostCache

type HostCache interface {
	// GetHost returns the hostname of a given node
	GetHost(node string) string

	// GetNodes returns all the nodes running on a given host
	GetNodes(host string) []string
}

HostCache keeps the node to host relationship, and supports host and node query.

type PodLister

type PodLister interface {
	ListPod(selector.Selector) ([]*v1.Pod, error)
}

PodLister list pods

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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