Documentation ¶
Index ¶
- func CleanupPluginBuilders()
- func CloseSession(ssn *Session)
- func RegisterAction(act Action)
- func RegisterPluginBuilder(name string, pc func() Plugin)
- type Action
- type Event
- type EventHandler
- type Plugin
- type PluginBuilder
- type Session
- func (ssn *Session) AddEventHandler(eh *EventHandler)
- func (ssn *Session) AddJobOrderFn(name string, cf api.CompareFn)
- func (ssn *Session) AddJobReadyFn(name string, vf api.ValidateFn)
- func (ssn *Session) AddJobValidFn(name string, fn api.ValidateExFn)
- func (ssn *Session) AddNodeOrderFn(name string, pf api.NodeOrderFn)
- func (ssn *Session) AddOverusedFn(name string, fn api.ValidateFn)
- func (ssn *Session) AddPredicateFn(name string, pf api.PredicateFn)
- func (ssn *Session) AddPreemptableFn(name string, cf api.EvictableFn)
- func (ssn *Session) AddQueueOrderFn(name string, qf api.CompareFn)
- func (ssn *Session) AddReclaimableFn(name string, rf api.EvictableFn)
- func (ssn *Session) AddTaskOrderFn(name string, cf api.CompareFn)
- func (ssn *Session) Allocate(task *api.TaskInfo, hostname string) error
- func (ssn *Session) Evict(reclaimee *api.TaskInfo, reason string) error
- func (ssn *Session) JobOrderFn(l, r interface{}) bool
- func (ssn *Session) JobReady(obj interface{}) bool
- func (ssn *Session) JobValid(obj interface{}) *api.ValidateResult
- func (ssn *Session) NodeOrderFn(task *api.TaskInfo, node *api.NodeInfo) (int, error)
- func (ssn *Session) Overused(queue *api.QueueInfo) bool
- func (ssn *Session) Pipeline(task *api.TaskInfo, hostname string) error
- func (ssn *Session) PredicateFn(task *api.TaskInfo, node *api.NodeInfo) error
- func (ssn *Session) Preemptable(preemptor *api.TaskInfo, preemptees []*api.TaskInfo) []*api.TaskInfo
- func (ssn *Session) QueueOrderFn(l, r interface{}) bool
- func (ssn *Session) Reclaimable(reclaimer *api.TaskInfo, reclaimees []*api.TaskInfo) []*api.TaskInfo
- func (ssn *Session) Statement() *Statement
- func (ssn Session) String() string
- func (ssn *Session) TaskCompareFns(l, r interface{}) int
- func (ssn *Session) TaskOrderFn(l, r interface{}) bool
- func (ssn *Session) UpdateJobCondition(jobInfo *api.JobInfo, cond *v1alpha1.PodGroupCondition) error
- type Statement
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CleanupPluginBuilders ¶
func CleanupPluginBuilders()
func CloseSession ¶
func CloseSession(ssn *Session)
func RegisterAction ¶
func RegisterAction(act Action)
func RegisterPluginBuilder ¶
Types ¶
type Action ¶
type Action interface { // The unique name of Action. Name() string // Initialize initializes the allocator plugins. Initialize() // Execute allocates the cluster's resources into each queue. Execute(ssn *Session) // UnIntialize un-initializes the allocator plugins. UnInitialize() }
Action is the interface of scheduler action.
type EventHandler ¶
type PluginBuilder ¶
type PluginBuilder func() Plugin
func GetPluginBuilder ¶
func GetPluginBuilder(name string) (PluginBuilder, bool)
type Session ¶
type Session struct { UID types.UID Jobs map[api.JobID]*api.JobInfo Nodes map[string]*api.NodeInfo Queues map[api.QueueID]*api.QueueInfo Backlog []*api.JobInfo Tiers []conf.Tier // contains filtered or unexported fields }
func (*Session) AddEventHandler ¶
func (ssn *Session) AddEventHandler(eh *EventHandler)
func (*Session) AddJobReadyFn ¶
func (ssn *Session) AddJobReadyFn(name string, vf api.ValidateFn)
func (*Session) AddJobValidFn ¶ added in v0.4.1
func (ssn *Session) AddJobValidFn(name string, fn api.ValidateExFn)
func (*Session) AddNodeOrderFn ¶ added in v0.4.1
func (ssn *Session) AddNodeOrderFn(name string, pf api.NodeOrderFn)
func (*Session) AddOverusedFn ¶
func (ssn *Session) AddOverusedFn(name string, fn api.ValidateFn)
func (*Session) AddPredicateFn ¶
func (ssn *Session) AddPredicateFn(name string, pf api.PredicateFn)
func (*Session) AddPreemptableFn ¶
func (ssn *Session) AddPreemptableFn(name string, cf api.EvictableFn)
func (*Session) AddQueueOrderFn ¶
func (*Session) AddReclaimableFn ¶
func (ssn *Session) AddReclaimableFn(name string, rf api.EvictableFn)
func (*Session) JobOrderFn ¶
func (*Session) JobValid ¶ added in v0.4.1
func (ssn *Session) JobValid(obj interface{}) *api.ValidateResult
func (*Session) NodeOrderFn ¶ added in v0.4.1
func (*Session) PredicateFn ¶
func (*Session) Preemptable ¶
func (*Session) QueueOrderFn ¶
func (*Session) Reclaimable ¶
func (*Session) TaskCompareFns ¶
func (*Session) TaskOrderFn ¶
func (*Session) UpdateJobCondition ¶ added in v0.4.1
func (ssn *Session) UpdateJobCondition(jobInfo *api.JobInfo, cond *v1alpha1.PodGroupCondition) error
UpdateJobStatus update job condition accordingly.
Click to show internal directories.
Click to hide internal directories.