Update egress RPC handler (#759)

* egress rpc handler

* add egress statuses

* nil redis client

* update protocol
This commit is contained in:
David Colburn
2022-06-13 12:18:17 -07:00
committed by GitHub
parent 15da445fd7
commit 4be096cf74
5 changed files with 50 additions and 29 deletions
+7
View File
@@ -15,6 +15,7 @@ import (
"gopkg.in/yaml.v3"
"github.com/livekit/protocol/auth"
"github.com/livekit/protocol/egress"
"github.com/livekit/protocol/livekit"
"github.com/livekit/protocol/logger"
"github.com/livekit/protocol/utils"
@@ -28,6 +29,7 @@ import (
func InitializeServer(conf *config.Config, currentNode routing.LocalNode) (*LivekitServer, error) {
wire.Build(
getNodeID,
createRedisClient,
createMessageBus,
createStore,
@@ -41,6 +43,7 @@ func InitializeServer(conf *config.Config, currentNode routing.LocalNode) (*Live
wire.Bind(new(livekit.RoomService), new(*RoomService)),
telemetry.NewAnalyticsService,
telemetry.NewTelemetryService,
egress.NewRedisRPCClient,
NewEgressService,
NewRecordingService,
NewRoomAllocator,
@@ -63,6 +66,10 @@ func InitializeRouter(conf *config.Config, currentNode routing.LocalNode) (routi
return nil, nil
}
func getNodeID(currentNode routing.LocalNode) livekit.NodeID {
return livekit.NodeID(currentNode.Id)
}
func createKeyProvider(conf *config.Config) (auth.KeyProvider, error) {
// prefer keyfile if set
if conf.KeyFile != "" {