decouple websocket and RTC nodes, prep for distributed

This commit is contained in:
David Zhao
2021-01-16 10:37:38 -08:00
parent 9a10a57b30
commit 9064f6ade1
61 changed files with 2683 additions and 1361 deletions
+23
View File
@@ -0,0 +1,23 @@
package service
import (
"github.com/google/wire"
"github.com/livekit/livekit-server/pkg/routing"
"github.com/livekit/livekit-server/pkg/rtc"
"github.com/livekit/livekit-server/proto/livekit"
)
var ServiceSet = wire.NewSet(
NewRoomService,
NewRTCService,
NewLivekitServer,
NewRTCRunner,
wire.Bind(new(livekit.RoomService), new(*RoomService)),
externalIpFromNode,
)
// helper to construct RTCConfig
func externalIpFromNode(currentNode routing.LocalNode) rtc.ExternalIP {
return rtc.ExternalIP(currentNode.Ip)
}