util

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2019 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractJobId

func ExtractJobId(pod *v1.Pod) string

func ExtractJobIds

func ExtractJobIds(pods []*v1.Pod) []string

func ExtractNames

func ExtractNames(pods []*v1.Pod) []string

func ExtractPodExitCodes added in v0.0.6

func ExtractPodExitCodes(pod *v1.Pod) map[string]int32

func ExtractPodFailedReason

func ExtractPodFailedReason(pod *v1.Pod) string

func ExtractPodStuckReason

func ExtractPodStuckReason(pod *v1.Pod) string

func FilterCompletedPods

func FilterCompletedPods(pods []*v1.Pod) []*v1.Pod

func FilterNonCompletedPods

func FilterNonCompletedPods(pods []*v1.Pod) []*v1.Pod

func FilterPodsWithPhase

func FilterPodsWithPhase(pods []*v1.Pod, podPhase v1.PodPhase) []*v1.Pod

func GetManagedPodSelector

func GetManagedPodSelector() labels.Selector

func IsInTerminalState

func IsInTerminalState(pod *v1.Pod) bool

func IsManagedPod

func IsManagedPod(pod *v1.Pod) bool

func IsReportingPhaseRequired

func IsReportingPhaseRequired(podPhase v1.PodPhase) bool

func IsRetryable

func IsRetryable(pod *v1.Pod) bool

func MergePodList

func MergePodList(list1 []*v1.Pod, list2 []*v1.Pod) []*v1.Pod

Types

type PodCache

type PodCache interface {
	Add(pod *v1.Pod)
	AddIfNotExists(pod *v1.Pod) bool
	Update(key string, pod *v1.Pod) bool
	Delete(jobId string)
	Get(jobId string) *v1.Pod
	GetAll() []*v1.Pod
}

func NewTimeExpiringPodCache

func NewTimeExpiringPodCache(expiry time.Duration, cleanUpInterval time.Duration, metricName string) PodCache

Jump to

Keyboard shortcuts

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