Commit Graph

2 Commits

Author SHA1 Message Date
rainzm
9d18b94ad6 refactor(scheduler): make forcast result clearer
forcast 的返回值包括:
1. CanCreate: 是否可以创建
2. FilteredCandidate: 被过滤掉的candidate(宿主机),并记录了
   过滤其的 filter 的名字以及给出的原因。
3. ReqCount: 请求的机器数量
4. AllowCount: 允许的机器数量
5. NotAllowReasons: 不允许的原因,每一个不被允许的都会被列出原因。
2020-09-08 14:27:31 +08:00
rainzm
4b4875cd70 feat: Add IResultHelper
1. Adjust the package structure about pkg/scheduler/core and
pkg/scheduler/manager

2. Add IResultHelper

3. Change the signature of genericScheduler.Schedule
func (*Unit, []Candidater) (*SchedResultItemList, error) ==>
func (*Unit, []Candidater, IResultHelper) (*ScheduleResult, error)
2020-09-07 16:13:20 +08:00