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) AddPreemptableFn(cf api.LessFn)
- func (ssn *Session) AddTaskOrderFn(cf api.CompareFn)
- func (ssn *Session) Allocate(task *api.TaskInfo, hostname string) error
- func (ssn *Session) JobOrderFn(l, r interface{}) bool
- func (ssn *Session) JobReady(obj interface{}) bool
- func (ssn *Session) Pipeline(task *api.TaskInfo, hostname string) error
- func (ssn *Session) Preempt(preemptor, preemptee *api.TaskInfo) error
- func (ssn *Session) Preemptable(preemptor, preemptee *api.TaskInfo) bool
- 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 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) AddPreemptableFn ¶
func (*Session) AddTaskOrderFn ¶
func (*Session) JobOrderFn ¶
func (*Session) Preemptable ¶
func (*Session) TaskCompareFns ¶
func (*Session) TaskOrderFn ¶
Click to show internal directories.
Click to hide internal directories.