NodeSelector using system load metric (#94)

* use load when selecting nodes

* Apply suggestions from code review

Co-authored-by: David Zhao <david@davidzhao.com>

* sysload selector test

* wire nodeSelectorFromConfig

* fix tests

* Update pkg/routing/selectorsystemload_test.go

Co-authored-by: David Zhao <david@davidzhao.com>

* dz review: nits

Co-authored-by: David Zhao <david@davidzhao.com>
This commit is contained in:
Mathew Kamkar
2021-08-26 15:24:39 -07:00
committed by GitHub
co-authored by David Zhao
parent 0a9d12bc35
commit c437152e2b
12 changed files with 140 additions and 21 deletions
+1 -1
View File
@@ -28,7 +28,7 @@ func testTurnServer(t *testing.T) {
currentNode.Id = utils.NewGuid(nodeId1)
// local routing and store
s, err := service.InitializeServer(conf, &StaticKeyProvider{}, currentNode, &routing.RandomSelector{})
s, err := service.InitializeServer(conf, &StaticKeyProvider{}, currentNode)
require.NoError(t, err)
go s.Start()
waitForServerToStart(s)