* egress updates

* pass egressInfo to delete

* update typefakes

* export StartEgress

* update protocol

* new rpc, rename stores

* add json tag

* update tests

* update protocol
This commit is contained in:
David Colburn
2022-02-24 14:57:14 -08:00
committed by GitHub
parent b7aac6cb6b
commit 20f21cce2b
28 changed files with 1952 additions and 507 deletions
+17 -5
View File
@@ -10,9 +10,10 @@ import (
//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 -generate
// encapsulates CRUD operations for room settings
//counterfeiter:generate . RoomStore
type RoomStore interface {
RORoomStore
//counterfeiter:generate . ObjectStore
type ObjectStore interface {
ServiceStore
EgressStore
// enable locking on a specific room to prevent race
// returns a (lock uuid, error)
@@ -26,8 +27,8 @@ type RoomStore interface {
DeleteParticipant(ctx context.Context, roomName livekit.RoomName, identity livekit.ParticipantIdentity) error
}
//counterfeiter:generate . RORoomStore
type RORoomStore interface {
//counterfeiter:generate . ServiceStore
type ServiceStore interface {
LoadRoom(ctx context.Context, name livekit.RoomName) (*livekit.Room, error)
// ListRooms returns currently active rooms. if names is not nil, it'll filter and return
// only rooms that match
@@ -37,6 +38,17 @@ type RORoomStore interface {
ListParticipants(ctx context.Context, roomName livekit.RoomName) ([]*livekit.ParticipantInfo, error)
}
//counterfeiter:generate . EgressStore
type EgressStore interface {
LoadRoom(ctx context.Context, name livekit.RoomName) (*livekit.Room, error)
StoreEgress(ctx context.Context, info *livekit.EgressInfo) error
LoadEgress(ctx context.Context, egressID string) (*livekit.EgressInfo, error)
ListEgress(ctx context.Context, roomID livekit.RoomID) ([]*livekit.EgressInfo, error)
UpdateEgress(ctx context.Context, info *livekit.EgressInfo) error
DeleteEgress(ctx context.Context, info *livekit.EgressInfo) error
}
//counterfeiter:generate . RoomAllocator
type RoomAllocator interface {
CreateRoom(ctx context.Context, req *livekit.CreateRoomRequest) (*livekit.Room, error)