Interface updates (#194)
* update interfaces, a bit of cleaning * regenerate * return interface for RoomService * export packetBufferSize * update router interface * move participant key into router * change locks back * read only room store * fix server rm locks * update SendJoinResponse * clean up imports * update room messaging * regenerate
This commit is contained in:
@@ -5,9 +5,6 @@ import (
|
||||
"time"
|
||||
|
||||
livekit "github.com/livekit/protocol/proto"
|
||||
|
||||
"github.com/livekit/livekit-server/pkg/routing"
|
||||
"github.com/livekit/livekit-server/pkg/rtc"
|
||||
)
|
||||
|
||||
//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 -generate
|
||||
@@ -15,31 +12,26 @@ import (
|
||||
// encapsulates CRUD operations for room settings
|
||||
//counterfeiter:generate . RoomStore
|
||||
type RoomStore interface {
|
||||
StoreRoom(ctx context.Context, room *livekit.Room) error
|
||||
LoadRoom(ctx context.Context, name string) (*livekit.Room, error)
|
||||
ListRooms(ctx context.Context) ([]*livekit.Room, error)
|
||||
DeleteRoom(ctx context.Context, name string) error
|
||||
RORoomStore
|
||||
|
||||
// enable locking on a specific room to prevent race
|
||||
// returns a (lock uuid, error)
|
||||
LockRoom(ctx context.Context, name string, duration time.Duration) (string, error)
|
||||
UnlockRoom(ctx context.Context, name string, uid string) error
|
||||
|
||||
StoreRoom(ctx context.Context, room *livekit.Room) error
|
||||
DeleteRoom(ctx context.Context, name string) error
|
||||
|
||||
StoreParticipant(ctx context.Context, roomName string, participant *livekit.ParticipantInfo) error
|
||||
LoadParticipant(ctx context.Context, roomName, identity string) (*livekit.ParticipantInfo, error)
|
||||
ListParticipants(ctx context.Context, roomName string) ([]*livekit.ParticipantInfo, error)
|
||||
DeleteParticipant(ctx context.Context, roomName, identity string) error
|
||||
}
|
||||
|
||||
type RoomManager interface {
|
||||
RoomStore
|
||||
type RORoomStore interface {
|
||||
LoadRoom(ctx context.Context, name string) (*livekit.Room, error)
|
||||
ListRooms(ctx context.Context) ([]*livekit.Room, error)
|
||||
|
||||
GetRoom(ctx context.Context, roomName string) *rtc.Room
|
||||
StartSession(ctx context.Context, roomName string, pi routing.ParticipantInit, requestSource routing.MessageSource, responseSink routing.MessageSink)
|
||||
CleanupRooms() error
|
||||
CloseIdleRooms()
|
||||
HasParticipants() bool
|
||||
Stop()
|
||||
LoadParticipant(ctx context.Context, roomName, identity string) (*livekit.ParticipantInfo, error)
|
||||
ListParticipants(ctx context.Context, roomName string) ([]*livekit.ParticipantInfo, error)
|
||||
}
|
||||
|
||||
type RoomAllocator interface {
|
||||
|
||||
Reference in New Issue
Block a user