Reorganized code.
Building the scheduler in phases. To be able to do this, increased visibility of schedulers/helpers.go#schedulerOptions. Refactored dependent code.
This commit is contained in:
parent
c9d4e66236
commit
4637355721
5 changed files with 110 additions and 91 deletions
|
@ -111,11 +111,11 @@ func InitSchedPolicyCharacteristics(schedPoliciesConfigFilename string) error {
|
|||
}
|
||||
|
||||
// build the scheduler with the options being applied
|
||||
func buildScheduler(s sched.Scheduler, opts ...schedulerOptions) {
|
||||
func buildScheduler(s sched.Scheduler, opts ...SchedulerOptions) {
|
||||
s.(ElectronScheduler).init(opts...)
|
||||
}
|
||||
|
||||
func SchedFactory(opts ...schedulerOptions) sched.Scheduler {
|
||||
func SchedFactory(opts ...SchedulerOptions) sched.Scheduler {
|
||||
s := &BaseScheduler{}
|
||||
buildScheduler(s, opts...)
|
||||
return s
|
||||
|
|
Reference in a new issue