Small refactor (#148)

* small refactor

* extra line

* fix room allocator test

* selector fakes not used

* keep decisions out of router

* put nodeId logic back

* fix room allocator test
This commit is contained in:
David Colburn
2021-10-18 21:49:16 -05:00
committed by GitHub
parent 1d626ba053
commit 0c8fe361b2
23 changed files with 344 additions and 381 deletions
+2 -2
View File
@@ -42,7 +42,7 @@ func (r *LocalRouter) GetNodeForRoom(ctx context.Context, roomName string) (*liv
return node, nil
}
func (r *LocalRouter) SetNodeForRoom(ctx context.Context, roomName string, nodeId string) error {
func (r *LocalRouter) SetNodeForRoom(ctx context.Context, roomName, nodeId string) error {
return nil
}
@@ -142,7 +142,7 @@ func (r *LocalRouter) Start() error {
return nil
}
func (r *LocalRouter) PreStop() {
func (r *LocalRouter) Drain() {
r.currentNode.State = livekit.NodeState_SHUTTING_DOWN
}