Versions in this module Expand all Collapse all v0 v0.1.0 Sep 28, 2015 Changes in this version + var BuiltinSchedulers = map[string]Factory + type BinPackIterator struct + func NewBinPackIterator(ctx Context, source RankIterator, evict bool, priority int) *BinPackIterator + func (iter *BinPackIterator) Next() *RankedNode + func (iter *BinPackIterator) Reset() + func (iter *BinPackIterator) SetPriority(p int) + func (iter *BinPackIterator) SetTasks(tasks []*structs.Task) + type ConstraintIterator struct + func NewConstraintIterator(ctx Context, source FeasibleIterator, constraints []*structs.Constraint) *ConstraintIterator + func (iter *ConstraintIterator) Next() *structs.Node + func (iter *ConstraintIterator) Reset() + func (iter *ConstraintIterator) SetConstraints(c []*structs.Constraint) + type Context interface + Logger func() *log.Logger + Metrics func() *structs.AllocMetric + Plan func() *structs.Plan + ProposedAllocs func(nodeID string) ([]*structs.Allocation, error) + Reset func() + State func() State + type DriverIterator struct + func NewDriverIterator(ctx Context, source FeasibleIterator, drivers map[string]struct{}) *DriverIterator + func (iter *DriverIterator) Next() *structs.Node + func (iter *DriverIterator) Reset() + func (iter *DriverIterator) SetDrivers(d map[string]struct{}) + type EvalContext struct + func NewEvalContext(s State, p *structs.Plan, log *log.Logger) *EvalContext + func (e *EvalContext) Logger() *log.Logger + func (e *EvalContext) Metrics() *structs.AllocMetric + func (e *EvalContext) Plan() *structs.Plan + func (e *EvalContext) ProposedAllocs(nodeID string) ([]*structs.Allocation, error) + func (e *EvalContext) Reset() + func (e *EvalContext) SetState(s State) + func (e *EvalContext) State() State + type Factory func(*log.Logger, State, Planner) Scheduler + type FeasibleIterator interface + Next func() *structs.Node + Reset func() + type FeasibleRankIterator struct + func NewFeasibleRankIterator(ctx Context, source FeasibleIterator) *FeasibleRankIterator + func (iter *FeasibleRankIterator) Next() *RankedNode + func (iter *FeasibleRankIterator) Reset() + type GenericScheduler struct + func (s *GenericScheduler) Process(eval *structs.Evaluation) error + type GenericStack struct + func NewGenericStack(batch bool, ctx Context, baseNodes []*structs.Node) *GenericStack + func (s *GenericStack) Select(tg *structs.TaskGroup) (*RankedNode, *structs.Resources) + func (s *GenericStack) SetJob(job *structs.Job) + func (s *GenericStack) SetNodes(baseNodes []*structs.Node) + type JobAntiAffinityIterator struct + func NewJobAntiAffinityIterator(ctx Context, source RankIterator, penalty float64, jobID string) *JobAntiAffinityIterator + func (iter *JobAntiAffinityIterator) Next() *RankedNode + func (iter *JobAntiAffinityIterator) Reset() + func (iter *JobAntiAffinityIterator) SetJob(jobID string) + type LimitIterator struct + func NewLimitIterator(ctx Context, source RankIterator, limit int) *LimitIterator + func (iter *LimitIterator) Next() *RankedNode + func (iter *LimitIterator) Reset() + func (iter *LimitIterator) SetLimit(limit int) + type MaxScoreIterator struct + func NewMaxScoreIterator(ctx Context, source RankIterator) *MaxScoreIterator + func (iter *MaxScoreIterator) Next() *RankedNode + func (iter *MaxScoreIterator) Reset() + type Planner interface + CreateEval func(*structs.Evaluation) error + SubmitPlan func(*structs.Plan) (*structs.PlanResult, State, error) + UpdateEval func(*structs.Evaluation) error + type RankIterator interface + Next func() *RankedNode + Reset func() + type RankedNode struct + Node *structs.Node + Proposed []*structs.Allocation + Score float64 + TaskResources map[string]*structs.Resources + func (r *RankedNode) GoString() string + func (r *RankedNode) ProposedAllocs(ctx Context) ([]*structs.Allocation, error) + func (r *RankedNode) SetTaskResources(task *structs.Task, resource *structs.Resources) + type Scheduler interface + Process func(*structs.Evaluation) error + func NewBatchScheduler(logger *log.Logger, state State, planner Planner) Scheduler + func NewScheduler(name string, logger *log.Logger, state State, planner Planner) (Scheduler, error) + func NewServiceScheduler(logger *log.Logger, state State, planner Planner) Scheduler + type SetStatusError struct + Err error + EvalStatus string + func (s *SetStatusError) Error() string + type Stack interface + Select func(tg *structs.TaskGroup) (*RankedNode, *structs.Resources) + SetJob func(job *structs.Job) + SetNodes func([]*structs.Node) + type State interface + AllocsByJob func(jobID string) ([]*structs.Allocation, error) + AllocsByNode func(node string) ([]*structs.Allocation, error) + JobByID func(id string) (*structs.Job, error) + NodeByID func(nodeID string) (*structs.Node, error) + Nodes func() (memdb.ResultIterator, error) + type StaticIterator struct + func NewRandomIterator(ctx Context, nodes []*structs.Node) *StaticIterator + func NewStaticIterator(ctx Context, nodes []*structs.Node) *StaticIterator + func (iter *StaticIterator) Next() *structs.Node + func (iter *StaticIterator) Reset() + func (iter *StaticIterator) SetNodes(nodes []*structs.Node) + type StaticRankIterator struct + func NewStaticRankIterator(ctx Context, nodes []*RankedNode) *StaticRankIterator + func (iter *StaticRankIterator) Next() *RankedNode + func (iter *StaticRankIterator) Reset()