cache

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

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

	TaskCompleted(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