util

package
v1.3.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2021 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultGangSchedulerName = "volcano"
)

Variables

This section is empty.

Functions

func ConvertPodList

func ConvertPodList(list []corev1.Pod) []*corev1.Pod

ConvertPodList convert pod list to pod pointer list

func ConvertServiceList

func ConvertServiceList(list []corev1.Service) []*corev1.Service

ConvertServiceList convert service list to service point list

func GetDelegatingClientFromClient

func GetDelegatingClientFromClient(c client.Client) (client.Client, error)

TODO (Jeffwan@): Find an elegant way to either use delegatingReader or directly use clientss GetDelegatingClientFromClient try to extract client reader from client, client reader reads cluster info from api client.

func HomeDir

func HomeDir() string

func IsGangSchedulerSet

func IsGangSchedulerSet(replicas map[commonv1.ReplicaType]*commonv1.ReplicaSpec, schedulerName string) bool

func OnDependentCreateFunc

func OnDependentCreateFunc(exp expectation.ControllerExpectationsInterface) func(event.CreateEvent) bool

OnDependentCreateFunc modify expectations when dependent (pod/service) creation observed.

func OnDependentDeleteFunc

func OnDependentDeleteFunc(exp expectation.ControllerExpectationsInterface) func(event.DeleteEvent) bool

OnDependentDeleteFunc modify expectations when dependent (pod/service) deletion observed.

func OnDependentUpdateFunc

func OnDependentUpdateFunc(jc *common.JobController) func(updateEvent event.UpdateEvent) bool

OnDependentUpdateFunc modify expectations when dependent (pod/service) update observed.

func SatisfiedExpectations

func SatisfiedExpectations(exp expectation.ControllerExpectationsInterface, jobKey string, replicaTypes []commonv1.ReplicaType) bool

SatisfiedExpectations returns true if the required adds/dels for the given mxjob have been observed. Add/del counts are established by the controller at sync time, and updated as controllees are observed by the controller manager.

Types

type FakeWorkQueue

type FakeWorkQueue struct{}

FakeWorkQueue implements RateLimitingInterface but actually does nothing.

func (*FakeWorkQueue) Add

func (f *FakeWorkQueue) Add(item interface{})

Add WorkQueue Add method

func (*FakeWorkQueue) AddAfter

func (f *FakeWorkQueue) AddAfter(item interface{}, duration time.Duration)

AddAfter WorkQueue AddAfter method

func (*FakeWorkQueue) AddRateLimited

func (f *FakeWorkQueue) AddRateLimited(item interface{})

AddRateLimited WorkQueue AddRateLimited method

func (*FakeWorkQueue) Done

func (f *FakeWorkQueue) Done(item interface{})

Done WorkQueue Done method

func (*FakeWorkQueue) Forget

func (f *FakeWorkQueue) Forget(item interface{})

Forget WorkQueue Forget method

func (*FakeWorkQueue) Get

func (f *FakeWorkQueue) Get() (item interface{}, shutdown bool)

Get WorkQueue Get method

func (*FakeWorkQueue) Len

func (f *FakeWorkQueue) Len() int

Len WorkQueue Len method

func (*FakeWorkQueue) NumRequeues

func (f *FakeWorkQueue) NumRequeues(item interface{}) int

NumRequeues WorkQueue NumRequeues method

func (*FakeWorkQueue) ShutDown

func (f *FakeWorkQueue) ShutDown()

ShutDown WorkQueue ShutDown method

func (*FakeWorkQueue) ShuttingDown

func (f *FakeWorkQueue) ShuttingDown() bool

ShuttingDown WorkQueue ShuttingDown method

Directories

Path Synopsis
v1
unstructured
Package unstructured is the package for unstructured informer, which is from https://github.com/argoproj/argo/blob/master/util/unstructured/unstructured.go This is a temporary solution for https://github.com/kubeflow/tf-operator/issues/561
Package unstructured is the package for unstructured informer, which is from https://github.com/argoproj/argo/blob/master/util/unstructured/unstructured.go This is a temporary solution for https://github.com/kubeflow/tf-operator/issues/561

Jump to

Keyboard shortcuts

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