Documentation ¶
Index ¶
- func CleanupPluginBuilders()
- func CloseSession(ssn *Session)
- func RegisterAction(act Action)
- func RegisterPluginBuilder(name string, pc func(*PluginArgs) Plugin)
- type Action
- type Event
- type EventHandler
- type Plugin
- type PluginArgs
- type PluginBuilder
- type Session
- func (ssn *Session) AddEventHandler(eh *EventHandler)
- func (ssn *Session) AddJobOrderFn(cf api.CompareFn)
- func (ssn *Session) AddJobReadyFn(vf api.ValidateFn)
- func (ssn *Session) AddOverusedFn(fn api.ValidateFn)
- func (ssn *Session) AddPredicateFn(pf api.PredicateFn)
- func (ssn *Session) AddPreemptableFn(cf api.PreemptableFn)
- func (ssn *Session) AddQueueOrderFn(qf api.CompareFn)
- func (ssn *Session) AddReclaimableFn(rf api.ReclaimableFn)
- func (ssn *Session) AddTaskOrderFn(cf api.CompareFn)
- func (ssn *Session) Allocate(task *api.TaskInfo, hostname string) error
- func (ssn *Session) Discard(job *api.JobInfo, event arbcorev1.Event, reason 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) 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) String() string
- func (ssn *Session) TaskCompareFns(l, r interface{}) int
- func (ssn *Session) TaskOrderFn(l, r interface{}) bool
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 ¶
func RegisterPluginBuilder(name string, pc func(*PluginArgs) Plugin)
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 PluginArgs ¶
type PluginBuilder ¶
type PluginBuilder func(*PluginArgs) Plugin
func GetPluginBuilder ¶
func GetPluginBuilder(name string) (PluginBuilder, bool)
type Session ¶
type Session struct { UID types.UID Jobs []*api.JobInfo JobIndex map[api.JobID]*api.JobInfo Nodes []*api.NodeInfo NodeIndex map[string]*api.NodeInfo Queues []*api.QueueInfo QueueIndex map[api.QueueID]*api.QueueInfo Others []*api.TaskInfo Backlog []*api.JobInfo // contains filtered or unexported fields }
func OpenSession ¶
func OpenSession(cache cache.Cache, args []*PluginArgs) *Session
func (*Session) AddEventHandler ¶
func (ssn *Session) AddEventHandler(eh *EventHandler)
func (*Session) AddJobOrderFn ¶
func (*Session) AddJobReadyFn ¶
func (ssn *Session) AddJobReadyFn(vf api.ValidateFn)
func (*Session) AddOverusedFn ¶
func (ssn *Session) AddOverusedFn(fn api.ValidateFn)
func (*Session) AddPredicateFn ¶
func (ssn *Session) AddPredicateFn(pf api.PredicateFn)
func (*Session) AddPreemptableFn ¶
func (ssn *Session) AddPreemptableFn(cf api.PreemptableFn)
func (*Session) AddQueueOrderFn ¶
func (*Session) AddReclaimableFn ¶
func (ssn *Session) AddReclaimableFn(rf api.ReclaimableFn)
func (*Session) AddTaskOrderFn ¶
func (*Session) JobOrderFn ¶
func (*Session) PredicateFn ¶
func (*Session) Preemptable ¶
func (*Session) QueueOrderFn ¶
func (*Session) Reclaimable ¶
func (*Session) TaskCompareFns ¶
func (*Session) TaskOrderFn ¶
Click to show internal directories.
Click to hide internal directories.