Documentation ¶
Index ¶
- func DemandName(pod *v1.Pod) string
- func GetPodFromObjectOrTombstone(obj interface{}) (*v1.Pod, bool)
- func IsPodTerminated(pod *v1.Pod) bool
- func IsSparkSchedulerDemand(obj interface{}) bool
- func IsSparkSchedulerExecutorPod(obj interface{}) bool
- func IsSparkSchedulerPod(obj interface{}) bool
- func ListWithPredicate(nodeLister corelisters.NodeLister, predicate NodeConditionPredicate) ([]*v1.Node, error)
- func OnDemandFulfilled(ctx context.Context, fn func(*v1alpha2.Demand)) func(interface{}, interface{})
- func OnPodScheduled(ctx context.Context, fn func(*v1.Pod)) func(interface{}, interface{})
- func PodName(demand *v1alpha2.Demand) string
- type NodeConditionPredicate
- type StringSet
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DemandName ¶
DemandName returns a demand name from a pod name
func GetPodFromObjectOrTombstone ¶
GetPodFromObjectOrTombstone tries to cast the passed object to a Pod object, and if that's not possible tries to get the Pod object from the tombstone
func IsPodTerminated ¶
IsPodTerminated returns whether the pod is considered to be terminated
func IsSparkSchedulerDemand ¶
func IsSparkSchedulerDemand(obj interface{}) bool
IsSparkSchedulerDemand returns whether the passed object is a demand created by the spark scheduler extender
func IsSparkSchedulerExecutorPod ¶
func IsSparkSchedulerExecutorPod(obj interface{}) bool
IsSparkSchedulerExecutorPod returns whether the passed object is a spark application pod which has this scheduler in the scheduler spec and is an executor
func IsSparkSchedulerPod ¶
func IsSparkSchedulerPod(obj interface{}) bool
IsSparkSchedulerPod returns whether the passed object is a spark application pod which has this scheduler in the scheduler spec
func ListWithPredicate ¶
func ListWithPredicate(nodeLister corelisters.NodeLister, predicate NodeConditionPredicate) ([]*v1.Node, error)
ListWithPredicate gets nodes that matches predicate function.
func OnDemandFulfilled ¶
func OnDemandFulfilled(ctx context.Context, fn func(*v1alpha2.Demand)) func(interface{}, interface{})
OnDemandFulfilled returns a function that calls the wrapped function if the demand object is fulfilled
func OnPodScheduled ¶
OnPodScheduled returns a function that calls the wrapped function if the pod is scheduled
Types ¶
type NodeConditionPredicate ¶
NodeConditionPredicate is a function that indicates whether the given node's conditions meet some set of criteria defined by the function.
type StringSet ¶
StringSet is a non-thread safe set of unique strings
func NewStringSet ¶
NewStringSet constructs and returns a StringSet
func (StringSet) AddAll ¶
AddAll adds the strings in es to the StringSet if they are not already there
func (StringSet) Contains ¶
Contains returns true if the string e is in the StringSet, false otherwise
func (StringSet) Remove ¶
Remove removes the string e from the StringSet if it is there. It is a no-op otherwise