Versions in this module Expand all Collapse all v0 v0.3.0 Feb 21, 2020 Changes in this version + func CleanupPluginBuilders() + func CloseSession(ssn *Session) + func RegisterAction(act Action) + func RegisterPluginBuilder(name string, pc PluginBuilder) + func TimeJitterAfter(new, old time.Time, duration, maxJitter time.Duration) bool + type Action interface + Execute func(ssn *Session) + Initialize func() + Name func() string + UnInitialize func() + func GetAction(name string) (Action, bool) + type Arguments map[string]string + func GetArgOfActionFromConf(configurations []conf.Configuration, actionName string) Arguments + func (a Arguments) GetBool(ptr *bool, key string) + func (a Arguments) GetFloat64(ptr *float64, key string) + func (a Arguments) GetInt(ptr *int, key string) + type Event struct + Task *api.TaskInfo + type EventHandler struct + AllocateFunc func(event *Event) + DeallocateFunc func(event *Event) + type Plugin interface + Name func() string + OnSessionClose func(ssn *Session) + OnSessionOpen func(ssn *Session) + type PluginBuilder func(Arguments) Plugin + func GetPluginBuilder(name string) (PluginBuilder, bool) + type Session struct + Backlog []*api.JobInfo + Configurations []conf.Configuration + Jobs map[api.JobID]*api.JobInfo + NamespaceInfo map[api.NamespaceName]*api.NamespaceInfo + Nodes map[string]*api.NodeInfo + Queues map[api.QueueID]*api.QueueInfo + Tiers []conf.Tier + UID types.UID + func OpenSession(cache cache.Cache, tiers []conf.Tier, configurations []conf.Configuration) *Session + func (ssn *Session) AddBatchNodeOrderFn(name string, pf api.BatchNodeOrderFn) + func (ssn *Session) AddEventHandler(eh *EventHandler) + func (ssn *Session) AddJobEnqueueableFn(name string, fn api.ValidateFn) + func (ssn *Session) AddJobOrderFn(name string, cf api.CompareFn) + func (ssn *Session) AddJobPipelinedFn(name string, vf api.ValidateFn) + func (ssn *Session) AddJobReadyFn(name string, vf api.ValidateFn) + func (ssn *Session) AddJobValidFn(name string, fn api.ValidateExFn) + func (ssn *Session) AddNamespaceOrderFn(name string, cf api.CompareFn) + func (ssn *Session) AddNodeMapFn(name string, pf api.NodeMapFn) + func (ssn *Session) AddNodeOrderFn(name string, pf api.NodeOrderFn) + func (ssn *Session) AddNodeReduceFn(name string, pf api.NodeReduceFn) + 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) BatchNodeOrderFn(task *api.TaskInfo, nodes []*api.NodeInfo) (map[string]float64, error) + func (ssn *Session) Evict(reclaimee *api.TaskInfo, reason string) error + func (ssn *Session) JobEnqueueable(obj interface{}) bool + func (ssn *Session) JobOrderFn(l, r interface{}) bool + func (ssn *Session) JobPipelined(obj interface{}) bool + func (ssn *Session) JobReady(obj interface{}) bool + func (ssn *Session) JobValid(obj interface{}) *api.ValidateResult + func (ssn *Session) NamespaceOrderFn(l, r interface{}) bool + func (ssn *Session) NodeOrderFn(task *api.TaskInfo, node *api.NodeInfo) (float64, error) + func (ssn *Session) NodeOrderMapFn(task *api.TaskInfo, node *api.NodeInfo) (map[string]float64, float64, error) + func (ssn *Session) NodeOrderReduceFn(task *api.TaskInfo, ...) (map[string]float64, 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) TaskCompareFns(l, r interface{}) int + func (ssn *Session) TaskOrderFn(l, r interface{}) bool + func (ssn *Session) UpdateJobCondition(jobInfo *api.JobInfo, cond *scheduling.PodGroupCondition) error + func (ssn Session) String() string + type Statement struct + func (s *Statement) Allocate(task *api.TaskInfo, hostname string) error + func (s *Statement) Commit() + func (s *Statement) Discard() + func (s *Statement) Evict(reclaimee *api.TaskInfo, reason string) error + func (s *Statement) Pipeline(task *api.TaskInfo, hostname string) error