Skip to content

Commit

Permalink
Abstract Resources (#256)
Browse files Browse the repository at this point in the history
* intro scheduler v2: adapter to v1

* cluster: rewrite create and realloc

* types: introduce resource interface to unify

* scheduler: expose SelectNodes to encap ScheduleV1

* store: new UpdateNodes and Processing interfaces

* strategy: adjust to new resource data structure

* rpc: create option harness resource interface

* utils: minor fix to transaction

* pass lint and codacy

* fix transactions for realloc and replace
  • Loading branch information
jschwinger233 authored and CMGS committed Oct 19, 2020
1 parent f2c5f6a commit 1631542
Show file tree
Hide file tree
Showing 55 changed files with 2,024 additions and 1,520 deletions.
5 changes: 3 additions & 2 deletions cluster/calcium/calcium.go
Expand Up @@ -35,10 +35,11 @@ func New(config types.Config, embeddedStorage bool) (*Calcium, error) {
}

// set scheduler
scheduler, err := complexscheduler.New(config)
potassium, err := complexscheduler.New(config)
if err != nil {
return nil, err
}
scheduler.InitSchedulerV1(potassium)

// set scm
var scm source.Source
Expand All @@ -55,7 +56,7 @@ func New(config types.Config, embeddedStorage bool) (*Calcium, error) {
// set watcher
watcher := helium.New(config.GRPCConfig, store)

return &Calcium{store: store, config: config, scheduler: scheduler, source: scm, watcher: watcher}, err
return &Calcium{store: store, config: config, scheduler: potassium, source: scm, watcher: watcher}, err
}

// Finalizer use for defer
Expand Down

0 comments on commit 1631542

Please sign in to comment.