cache

package
v1.16.1 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2026 License: Apache-2.0 Imports: 11 Imported by: 2 modules, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func JobKey

func JobKey(job *v1alpha1.Job) string

JobKey gets the "ns"/"name" format of the given job.

func JobKeyByName

func JobKeyByName(namespace string, name string) string

JobKeyByName gets the key for the job name.

func JobKeyByReq

func JobKeyByReq(req *apis.Request) string

JobKeyByReq gets the key for the job request.

Types

type Cache

type Cache interface {
	Run(stopCh <-chan struct{})

	Get(key string) (*apis.JobInfo, error)
	GetStatus(key string) (*v1alpha1.JobStatus, error)
	Add(obj *v1alpha1.Job) error
	Update(obj *v1alpha1.Job) error
	Delete(obj *v1alpha1.Job) error

	AddPod(pod *v1.Pod) error
	UpdatePod(pod *v1.Pod) error
	DeletePod(pod *v1.Pod) error
	HasPod(pod *v1.Pod) bool

	TaskCompleted(jobKey, taskName string) bool
	TaskFailed(jobKey, taskName string) bool
}

Cache Interface.

func New

func New() Cache

New gets the job Cache.

Jump to

Keyboard shortcuts

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