Egress (#455)
* 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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user