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
|
@ -84,7 +84,7 @@ type BaseScheduler struct {
|
|||
hasReceivedResourceOffers bool
|
||||
}
|
||||
|
||||
func (s *BaseScheduler) init(opts ...schedulerOptions) {
|
||||
func (s *BaseScheduler) init(opts ...SchedulerOptions) {
|
||||
for _, opt := range opts {
|
||||
// applying options
|
||||
if err := opt(s); err != nil {
|
||||
|
|
Reference in a new issue