Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FilterPods ¶
filterPods returns pods based on their phase.
func GetPodResources ¶
func GetPodResources(template *v1.PodTemplateSpec) *schedulerapi.Resource
Types ¶
type Interface ¶
type Interface interface { SyncQueueJob(queuejob *qjobv1.XQueueJob, qjobRes *qjobv1.XQueueJobResource) error UpdateQueueJobStatus(queuejob *qjobv1.XQueueJob) error GetAggregatedResources(queuejob *qjobv1.XQueueJob) *schedulerapi.Resource GetAggregatedResourcesByPriority(priority int, queuejob *qjobv1.XQueueJob) *schedulerapi.Resource Cleanup(queuejob *qjobv1.XQueueJob, qjobRes *qjobv1.XQueueJobResource) error Run(stopCh <-chan struct{}) }
Interface is an abstract interface for queue job resource management.
type RefByLabel ¶
type RefByLabel struct {
// contains filtered or unexported fields
}
RefByLabel : A reference manager by resource vector index
func (*RefByLabel) AddReference ¶
func (rm *RefByLabel) AddReference(owner *qjobv1.XQueueJobResource, ownee runtime.Object) error
AddReference : add ref
func (*RefByLabel) AddTag ¶
func (rm *RefByLabel) AddTag(owner *qjobv1.XQueueJobResource, getTag func() string) error
AddTag : add tag
func (*RefByLabel) BelongTo ¶
func (rm *RefByLabel) BelongTo(owner *qjobv1.XQueueJobResource, ownee runtime.Object) bool
BelongTo : belong to QJ
type RefManager ¶
type RefManager interface { //Tag the owner AddTag(owner *qjobv1.XQueueJobResource, getTag func() string) error //check whether ownee is a member of owner BelongTo(owner *qjobv1.XQueueJobResource, ownee runtime.Object) bool //mark the ownee to be a member of owner AddReference(owner *qjobv1.XQueueJobResource, ownee runtime.Object) error }
RefManager : Define reference manager commont interface
type RegisteredResources ¶
type RegisteredResources struct {
// contains filtered or unexported fields
}
RegisteredResources : registered resources
func (*RegisteredResources) InitQueueJobResource ¶
func (rres *RegisteredResources) InitQueueJobResource(t qjobv1.ResourceType, config *rest.Config) (Interface, bool, error)
InitQueueJobResource creates an instance of the type queue job resource. It returns `false` if the type is not known.
func (*RegisteredResources) Register ¶
func (rres *RegisteredResources) Register(t qjobv1.ResourceType, factory Factory)
Register registers a Factory by type. This is expected to happen during app startup.
func (*RegisteredResources) Registered ¶
func (rres *RegisteredResources) Registered() []qjobv1.ResourceType
Registered enumerates the names of all registered plugins.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.