add psrpc room service (#2171)

* add psrpc room service

* update deps

* disable by default

* feedback

* config

* test
This commit is contained in:
Paul Wells
2023-10-22 22:49:38 -07:00
committed by GitHub
parent 08997c96b0
commit 325e5ca753
17 changed files with 401 additions and 143 deletions
+12 -2
View File
@@ -23,8 +23,10 @@ import (
"github.com/livekit/protocol/auth"
"github.com/livekit/protocol/livekit"
"github.com/livekit/protocol/rpc/rpcfakes"
"github.com/livekit/livekit-server/pkg/config"
"github.com/livekit/livekit-server/pkg/routing"
"github.com/livekit/livekit-server/pkg/routing/routingfakes"
"github.com/livekit/livekit-server/pkg/service"
"github.com/livekit/livekit-server/pkg/service/servicefakes"
@@ -126,9 +128,17 @@ func newTestRoomService(conf config.RoomConfig) *TestRoomService {
router := &routingfakes.FakeRouter{}
allocator := &servicefakes.FakeRoomAllocator{}
store := &servicefakes.FakeServiceStore{}
svc, err := service.NewRoomService(conf,
svc, err := service.NewRoomService(
conf,
config.APIConfig{ExecutionTimeout: 2},
router, allocator, store, nil)
config.PSRPCConfig{},
router,
allocator,
store,
nil,
routing.NewTopicFormatter(),
&rpcfakes.FakeTypedRoomClient{},
)
if err != nil {
panic(err)
}