node

package
v0.0.0-...-6b456cb Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const NodeClassLabel = "np.class"
View Source
const PodDurationLabel = "np.runDuration"
View Source
const PodPhaseLabel = "np.terminalPhase"

Variables

This section is empty.

Functions

func RunDuration

func RunDuration(pod *v1.Pod) time.Duration

Returns the specified run duration as declared in a well-known pod label. If left unset or the value cannot be parsed as a duration, defaults to 1 second.

func TerminalPhase

func TerminalPhase(pod *v1.Pod) v1.PodPhase

Returns the specified terminal phase as declared in a well-known pod label. If left unset or the value does not match a known terminal phase, defaults to "Succeeded".

Types

type FakeNode

type FakeNode interface {
	Name() string
	Class() string
	Start(client *kubernetes.Clientset) error
	Stop() error
}

func NewFakeNode

func NewFakeNode(name string, class string, labels map[string]string, resources config.NodeResources) FakeNode

type PodSet

type PodSet interface {
	Add(pod *v1.Pod)
	Remove(pod *v1.Pod)
	Update(pod *v1.Pod)
	OfPhase(phases ...v1.PodPhase) []*v1.Pod
	Expired() []*v1.Pod
}

func NewPodSet

func NewPodSet() PodSet

Jump to

Keyboard shortcuts

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