Documentation ¶
Index ¶
- Constants
- Variables
- func EnsureAdminPermission(ctx context.Context, room livekit.RoomName) error
- func EnsureCreatePermission(ctx context.Context) error
- func EnsureJoinPermission(ctx context.Context) (name livekit.RoomName, err error)
- func EnsureListPermission(ctx context.Context) error
- func EnsureRecordPermission(ctx context.Context) error
- func GetGrants(ctx context.Context) *auth.ClaimGrants
- func InitializeRouter(conf *config.Config, currentNode routing.LocalNode) (routing.Router, error)
- func IsValidDomain(domain string) bool
- func NewTurnServer(conf *config.Config, authHandler turn.AuthHandler) (*turn.Server, error)
- func SetAuthorizationToken(r *http.Request, token string)
- func WithGrants(ctx context.Context, grants *auth.ClaimGrants) context.Context
- type APIKeyAuthMiddleware
- type EgressService
- func (s *EgressService) ListEgress(ctx context.Context, req *livekit.ListEgressRequest) (*livekit.ListEgressResponse, error)
- func (s *EgressService) Start()
- func (s *EgressService) StartEgress(ctx context.Context, roomName livekit.RoomName, ...) (*livekit.EgressInfo, error)
- func (s *EgressService) StartTrackCompositeEgress(ctx context.Context, req *livekit.TrackCompositeEgressRequest) (*livekit.EgressInfo, error)
- func (s *EgressService) StartTrackEgress(ctx context.Context, req *livekit.TrackEgressRequest) (*livekit.EgressInfo, error)
- func (s *EgressService) StartWebCompositeEgress(ctx context.Context, req *livekit.WebCompositeEgressRequest) (*livekit.EgressInfo, error)
- func (s *EgressService) Stop()
- func (s *EgressService) StopEgress(ctx context.Context, req *livekit.StopEgressRequest) (*livekit.EgressInfo, error)
- func (s *EgressService) UpdateLayout(ctx context.Context, req *livekit.UpdateLayoutRequest) (*livekit.EgressInfo, error)
- func (s *EgressService) UpdateStream(ctx context.Context, req *livekit.UpdateStreamRequest) (*livekit.EgressInfo, error)
- type EgressStore
- type LayoutMetadata
- type LivekitServer
- type LocalStore
- func (s *LocalStore) DeleteEgress(_ context.Context, _ *livekit.EgressInfo) error
- func (s *LocalStore) DeleteParticipant(_ context.Context, roomName livekit.RoomName, ...) error
- func (s *LocalStore) DeleteRoom(ctx context.Context, name livekit.RoomName) error
- func (s *LocalStore) ListEgress(_ context.Context, _ livekit.RoomID) ([]*livekit.EgressInfo, error)
- func (s *LocalStore) ListParticipants(_ context.Context, roomName livekit.RoomName) ([]*livekit.ParticipantInfo, error)
- func (s *LocalStore) ListRooms(_ context.Context, names []livekit.RoomName) ([]*livekit.Room, error)
- func (s *LocalStore) LoadEgress(_ context.Context, _ string) (*livekit.EgressInfo, error)
- func (s *LocalStore) LoadParticipant(_ context.Context, roomName livekit.RoomName, ...) (*livekit.ParticipantInfo, error)
- func (s *LocalStore) LoadRoom(_ context.Context, name livekit.RoomName) (*livekit.Room, error)
- func (s *LocalStore) LockRoom(_ context.Context, _ livekit.RoomName, _ time.Duration) (string, error)
- func (s *LocalStore) StoreEgress(_ context.Context, _ *livekit.EgressInfo) error
- func (s *LocalStore) StoreParticipant(_ context.Context, roomName livekit.RoomName, ...) error
- func (s *LocalStore) StoreRoom(_ context.Context, room *livekit.Room) error
- func (s *LocalStore) UnlockRoom(_ context.Context, _ livekit.RoomName, _ string) error
- func (s *LocalStore) UpdateEgress(_ context.Context, _ *livekit.EgressInfo) error
- type ObjectStore
- type RTCService
- type RecordingService
- func (s *RecordingService) AddOutput(ctx context.Context, req *livekit.AddOutputRequest) (*emptypb.Empty, error)
- func (s *RecordingService) EndRecording(ctx context.Context, req *livekit.EndRecordingRequest) (*emptypb.Empty, error)
- func (s *RecordingService) RemoveOutput(ctx context.Context, req *livekit.RemoveOutputRequest) (*emptypb.Empty, error)
- func (s *RecordingService) Start()
- func (s *RecordingService) StartRecording(ctx context.Context, req *livekit.StartRecordingRequest) (*livekit.StartRecordingResponse, error)
- func (s *RecordingService) Stop()
- type RedisStore
- func (s *RedisStore) DeleteEgress(_ context.Context, info *livekit.EgressInfo) error
- func (s *RedisStore) DeleteParticipant(_ context.Context, roomName livekit.RoomName, ...) error
- func (s *RedisStore) DeleteRoom(ctx context.Context, name livekit.RoomName) error
- func (s *RedisStore) ListEgress(_ context.Context, roomID livekit.RoomID) ([]*livekit.EgressInfo, error)
- func (s *RedisStore) ListParticipants(_ context.Context, roomName livekit.RoomName) ([]*livekit.ParticipantInfo, error)
- func (s *RedisStore) ListRooms(_ context.Context, names []livekit.RoomName) ([]*livekit.Room, error)
- func (s *RedisStore) LoadEgress(_ context.Context, egressID string) (*livekit.EgressInfo, error)
- func (s *RedisStore) LoadParticipant(_ context.Context, roomName livekit.RoomName, ...) (*livekit.ParticipantInfo, error)
- func (s *RedisStore) LoadRoom(_ context.Context, name livekit.RoomName) (*livekit.Room, error)
- func (s *RedisStore) LockRoom(_ context.Context, name livekit.RoomName, duration time.Duration) (string, error)
- func (s *RedisStore) StoreEgress(_ context.Context, info *livekit.EgressInfo) error
- func (s *RedisStore) StoreParticipant(_ context.Context, roomName livekit.RoomName, ...) error
- func (s *RedisStore) StoreRoom(_ context.Context, room *livekit.Room) error
- func (s *RedisStore) UnlockRoom(_ context.Context, name livekit.RoomName, uid string) error
- func (s *RedisStore) UpdateEgress(_ context.Context, info *livekit.EgressInfo) error
- type RoomAllocator
- type RoomManager
- func (r *RoomManager) CleanupRooms() error
- func (r *RoomManager) CloseIdleRooms()
- func (r *RoomManager) DeleteRoom(ctx context.Context, roomName livekit.RoomName) error
- func (r *RoomManager) GetRoom(_ context.Context, roomName livekit.RoomName) *rtc.Room
- func (r *RoomManager) HasParticipants() bool
- func (r *RoomManager) StartSession(ctx context.Context, roomName livekit.RoomName, pi routing.ParticipantInit, ...)
- func (r *RoomManager) Stop()
- type RoomService
- func (s *RoomService) CreateRoom(ctx context.Context, req *livekit.CreateRoomRequest) (rm *livekit.Room, err error)
- func (s *RoomService) DeleteRoom(ctx context.Context, req *livekit.DeleteRoomRequest) (*livekit.DeleteRoomResponse, error)
- func (s *RoomService) GetParticipant(ctx context.Context, req *livekit.RoomParticipantIdentity) (res *livekit.ParticipantInfo, err error)
- func (s *RoomService) ListParticipants(ctx context.Context, req *livekit.ListParticipantsRequest) (res *livekit.ListParticipantsResponse, err error)
- func (s *RoomService) ListRooms(ctx context.Context, req *livekit.ListRoomsRequest) (res *livekit.ListRoomsResponse, err error)
- func (s *RoomService) MutePublishedTrack(ctx context.Context, req *livekit.MuteRoomTrackRequest) (res *livekit.MuteRoomTrackResponse, err error)
- func (s *RoomService) RemoveParticipant(ctx context.Context, req *livekit.RoomParticipantIdentity) (res *livekit.RemoveParticipantResponse, err error)
- func (s *RoomService) SendData(ctx context.Context, req *livekit.SendDataRequest) (*livekit.SendDataResponse, error)
- func (s *RoomService) UpdateParticipant(ctx context.Context, req *livekit.UpdateParticipantRequest) (*livekit.ParticipantInfo, error)
- func (s *RoomService) UpdateRoomMetadata(ctx context.Context, req *livekit.UpdateRoomMetadataRequest) (*livekit.Room, error)
- func (s *RoomService) UpdateSubscriptions(ctx context.Context, req *livekit.UpdateSubscriptionsRequest) (*livekit.UpdateSubscriptionsResponse, error)
- type ServiceStore
- type StandardRoomAllocator
- type WSSignalConnection
Constants ¶
const ( // RoomsKey is hash of room_name => Room proto RoomsKey = "rooms" // EgressKey is a hash of egressID => egress info EgressKey = "egress" RoomEgressPrefix = "room_egress:" // RoomParticipantsPrefix is hash of participant_name => ParticipantInfo RoomParticipantsPrefix = "room_participants:" // RoomLockPrefix is a simple key containing a provided lock uid RoomLockPrefix = "room_lock:" )
const (
LivekitRealm = "livekit"
)
Variables ¶
var ( ErrEgressNotFound = errors.New("egress does not exist") ErrEgressNotConnected = errors.New("egress not connected (redis required)") ErrRoomNotFound = errors.New("requested room does not exist") ErrRoomLockFailed = errors.New("could not lock room") ErrRoomUnlockFailed = errors.New("could not unlock room, lock token does not match") ErrParticipantNotFound = errors.New("participant does not exist") ErrTrackNotFound = errors.New("track is not found") ErrWebHookMissingAPIKey = errors.New("api_key is required to use webhooks") ErrOperationFailed = errors.New("operation cannot be completed") )
var (
ErrPermissionDenied = errors.New("permissions denied")
)
Functions ¶
func EnsureAdminPermission ¶
func EnsureCreatePermission ¶
func EnsureJoinPermission ¶
func EnsureListPermission ¶
func EnsureRecordPermission ¶
func InitializeRouter ¶
func IsValidDomain ¶
func NewTurnServer ¶
func SetAuthorizationToken ¶
func WithGrants ¶
Types ¶
type APIKeyAuthMiddleware ¶
type APIKeyAuthMiddleware struct {
// contains filtered or unexported fields
}
authentication middleware
func NewAPIKeyAuthMiddleware ¶
func NewAPIKeyAuthMiddleware(provider auth.KeyProvider) *APIKeyAuthMiddleware
func (*APIKeyAuthMiddleware) ServeHTTP ¶
func (m *APIKeyAuthMiddleware) ServeHTTP(w http.ResponseWriter, r *http.Request, next http.HandlerFunc)
type EgressService ¶
type EgressService struct {
// contains filtered or unexported fields
}
func NewEgressService ¶
func NewEgressService(bus utils.MessageBus, es EgressStore, rs livekit.RoomService, ts telemetry.TelemetryService) *EgressService
func (*EgressService) ListEgress ¶
func (s *EgressService) ListEgress(ctx context.Context, req *livekit.ListEgressRequest) (*livekit.ListEgressResponse, error)
func (*EgressService) Start ¶
func (s *EgressService) Start()
func (*EgressService) StartEgress ¶
func (s *EgressService) StartEgress(ctx context.Context, roomName livekit.RoomName, req *livekit.StartEgressRequest) (*livekit.EgressInfo, error)
func (*EgressService) StartTrackCompositeEgress ¶
func (s *EgressService) StartTrackCompositeEgress(ctx context.Context, req *livekit.TrackCompositeEgressRequest) (*livekit.EgressInfo, error)
func (*EgressService) StartTrackEgress ¶
func (s *EgressService) StartTrackEgress(ctx context.Context, req *livekit.TrackEgressRequest) (*livekit.EgressInfo, error)
func (*EgressService) StartWebCompositeEgress ¶
func (s *EgressService) StartWebCompositeEgress(ctx context.Context, req *livekit.WebCompositeEgressRequest) (*livekit.EgressInfo, error)
func (*EgressService) Stop ¶
func (s *EgressService) Stop()
func (*EgressService) StopEgress ¶
func (s *EgressService) StopEgress(ctx context.Context, req *livekit.StopEgressRequest) (*livekit.EgressInfo, error)
func (*EgressService) UpdateLayout ¶
func (s *EgressService) UpdateLayout(ctx context.Context, req *livekit.UpdateLayoutRequest) (*livekit.EgressInfo, error)
func (*EgressService) UpdateStream ¶
func (s *EgressService) UpdateStream(ctx context.Context, req *livekit.UpdateStreamRequest) (*livekit.EgressInfo, error)
type 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 }
type LayoutMetadata ¶
type LayoutMetadata struct {
Layout string `json:"layout"`
}
type LivekitServer ¶
type LivekitServer struct {
// contains filtered or unexported fields
}
func InitializeServer ¶
func NewLivekitServer ¶
func NewLivekitServer(conf *config.Config, roomService livekit.RoomService, egressService *EgressService, recService *RecordingService, rtcService *RTCService, keyProvider auth.KeyProvider, router routing.Router, roomManager *RoomManager, turnServer *turn.Server, currentNode routing.LocalNode, ) (s *LivekitServer, err error)
func (*LivekitServer) HTTPPort ¶
func (s *LivekitServer) HTTPPort() int
func (*LivekitServer) IsRunning ¶
func (s *LivekitServer) IsRunning() bool
func (*LivekitServer) Node ¶
func (s *LivekitServer) Node() *livekit.Node
func (*LivekitServer) RoomManager ¶
func (s *LivekitServer) RoomManager() *RoomManager
func (*LivekitServer) Start ¶
func (s *LivekitServer) Start() error
func (*LivekitServer) Stop ¶
func (s *LivekitServer) Stop(force bool)
type LocalStore ¶
type LocalStore struct {
// contains filtered or unexported fields
}
encapsulates CRUD operations for room settings
func NewLocalStore ¶
func NewLocalStore() *LocalStore
func (*LocalStore) DeleteEgress ¶
func (s *LocalStore) DeleteEgress(_ context.Context, _ *livekit.EgressInfo) error
func (*LocalStore) DeleteParticipant ¶
func (s *LocalStore) DeleteParticipant(_ context.Context, roomName livekit.RoomName, identity livekit.ParticipantIdentity) error
func (*LocalStore) DeleteRoom ¶
func (*LocalStore) ListEgress ¶
func (s *LocalStore) ListEgress(_ context.Context, _ livekit.RoomID) ([]*livekit.EgressInfo, error)
func (*LocalStore) ListParticipants ¶
func (s *LocalStore) ListParticipants(_ context.Context, roomName livekit.RoomName) ([]*livekit.ParticipantInfo, error)
func (*LocalStore) LoadEgress ¶
func (s *LocalStore) LoadEgress(_ context.Context, _ string) (*livekit.EgressInfo, error)
func (*LocalStore) LoadParticipant ¶
func (s *LocalStore) LoadParticipant(_ context.Context, roomName livekit.RoomName, identity livekit.ParticipantIdentity) (*livekit.ParticipantInfo, error)
func (*LocalStore) StoreEgress ¶
func (s *LocalStore) StoreEgress(_ context.Context, _ *livekit.EgressInfo) error
func (*LocalStore) StoreParticipant ¶
func (s *LocalStore) StoreParticipant(_ context.Context, roomName livekit.RoomName, participant *livekit.ParticipantInfo) error
func (*LocalStore) UnlockRoom ¶
func (*LocalStore) UpdateEgress ¶
func (s *LocalStore) UpdateEgress(_ context.Context, _ *livekit.EgressInfo) error
type ObjectStore ¶
type ObjectStore interface { ServiceStore EgressStore // enable locking on a specific room to prevent race // returns a (lock uuid, error) LockRoom(ctx context.Context, name livekit.RoomName, duration time.Duration) (string, error) UnlockRoom(ctx context.Context, name livekit.RoomName, uid string) error StoreRoom(ctx context.Context, room *livekit.Room) error DeleteRoom(ctx context.Context, name livekit.RoomName) error StoreParticipant(ctx context.Context, roomName livekit.RoomName, participant *livekit.ParticipantInfo) error DeleteParticipant(ctx context.Context, roomName livekit.RoomName, identity livekit.ParticipantIdentity) error }
encapsulates CRUD operations for room settings
type RTCService ¶
type RTCService struct {
// contains filtered or unexported fields
}
func NewRTCService ¶
func NewRTCService( conf *config.Config, ra RoomAllocator, store ServiceStore, router routing.MessageRouter, currentNode routing.LocalNode, ) *RTCService
func (*RTCService) ParseClientInfo ¶
func (s *RTCService) ParseClientInfo(r *http.Request) *livekit.ClientInfo
func (*RTCService) ServeHTTP ¶
func (s *RTCService) ServeHTTP(w http.ResponseWriter, r *http.Request)
func (*RTCService) Validate ¶
func (s *RTCService) Validate(w http.ResponseWriter, r *http.Request)
type RecordingService ¶
type RecordingService struct {
// contains filtered or unexported fields
}
func NewRecordingService ¶
func NewRecordingService(mb utils.MessageBus, telemetry telemetry.TelemetryService) *RecordingService
func (*RecordingService) AddOutput ¶
func (s *RecordingService) AddOutput(ctx context.Context, req *livekit.AddOutputRequest) (*emptypb.Empty, error)
RecordingService is deprecated, use EgressService instead
func (*RecordingService) EndRecording ¶
func (s *RecordingService) EndRecording(ctx context.Context, req *livekit.EndRecordingRequest) (*emptypb.Empty, error)
RecordingService is deprecated, use EgressService instead
func (*RecordingService) RemoveOutput ¶
func (s *RecordingService) RemoveOutput(ctx context.Context, req *livekit.RemoveOutputRequest) (*emptypb.Empty, error)
RecordingService is deprecated, use EgressService instead
func (*RecordingService) Start ¶
func (s *RecordingService) Start()
func (*RecordingService) StartRecording ¶
func (s *RecordingService) StartRecording(ctx context.Context, req *livekit.StartRecordingRequest) (*livekit.StartRecordingResponse, error)
RecordingService is deprecated, use EgressService instead
func (*RecordingService) Stop ¶
func (s *RecordingService) Stop()
type RedisStore ¶
type RedisStore struct {
// contains filtered or unexported fields
}
func NewRedisStore ¶
func NewRedisStore(rc *redis.Client) *RedisStore
func (*RedisStore) DeleteEgress ¶
func (s *RedisStore) DeleteEgress(_ context.Context, info *livekit.EgressInfo) error
func (*RedisStore) DeleteParticipant ¶
func (s *RedisStore) DeleteParticipant(_ context.Context, roomName livekit.RoomName, identity livekit.ParticipantIdentity) error
func (*RedisStore) DeleteRoom ¶
func (*RedisStore) ListEgress ¶
func (s *RedisStore) ListEgress(_ context.Context, roomID livekit.RoomID) ([]*livekit.EgressInfo, error)
func (*RedisStore) ListParticipants ¶
func (s *RedisStore) ListParticipants(_ context.Context, roomName livekit.RoomName) ([]*livekit.ParticipantInfo, error)
func (*RedisStore) LoadEgress ¶
func (s *RedisStore) LoadEgress(_ context.Context, egressID string) (*livekit.EgressInfo, error)
func (*RedisStore) LoadParticipant ¶
func (s *RedisStore) LoadParticipant(_ context.Context, roomName livekit.RoomName, identity livekit.ParticipantIdentity) (*livekit.ParticipantInfo, error)
func (*RedisStore) StoreEgress ¶
func (s *RedisStore) StoreEgress(_ context.Context, info *livekit.EgressInfo) error
func (*RedisStore) StoreParticipant ¶
func (s *RedisStore) StoreParticipant(_ context.Context, roomName livekit.RoomName, participant *livekit.ParticipantInfo) error
func (*RedisStore) UnlockRoom ¶
func (*RedisStore) UpdateEgress ¶
func (s *RedisStore) UpdateEgress(_ context.Context, info *livekit.EgressInfo) error
type RoomAllocator ¶
type RoomAllocator interface {
CreateRoom(ctx context.Context, req *livekit.CreateRoomRequest) (*livekit.Room, error)
}
func NewRoomAllocator ¶
func NewRoomAllocator(conf *config.Config, router routing.Router, rs ObjectStore) (RoomAllocator, error)
type RoomManager ¶
type RoomManager struct {
// contains filtered or unexported fields
}
RoomManager manages rooms and its interaction with participants. It's responsible for creating, deleting rooms, as well as running sessions for participants
func NewLocalRoomManager ¶
func NewLocalRoomManager( conf *config.Config, roomStore ObjectStore, currentNode routing.LocalNode, router routing.Router, telemetry telemetry.TelemetryService, clientConfManager clientconfiguration.ClientConfigurationManager, ) (*RoomManager, error)
func (*RoomManager) CleanupRooms ¶
func (r *RoomManager) CleanupRooms() error
CleanupRooms cleans up after old rooms that have been around for a while
func (*RoomManager) CloseIdleRooms ¶
func (r *RoomManager) CloseIdleRooms()
func (*RoomManager) DeleteRoom ¶
DeleteRoom completely deletes all room information, including active sessions, room store, and routing info
func (*RoomManager) HasParticipants ¶
func (r *RoomManager) HasParticipants() bool
func (*RoomManager) StartSession ¶
func (r *RoomManager) StartSession(ctx context.Context, roomName livekit.RoomName, pi routing.ParticipantInit, requestSource routing.MessageSource, responseSink routing.MessageSink)
StartSession starts WebRTC session when a new participant is connected, takes place on RTC node
func (*RoomManager) Stop ¶
func (r *RoomManager) Stop()
type RoomService ¶
type RoomService struct {
// contains filtered or unexported fields
}
A rooms service that supports a single node
func NewRoomService ¶
func NewRoomService(ra RoomAllocator, rs ServiceStore, router routing.MessageRouter) (svc *RoomService, err error)
func (*RoomService) CreateRoom ¶
func (s *RoomService) CreateRoom(ctx context.Context, req *livekit.CreateRoomRequest) (rm *livekit.Room, err error)
func (*RoomService) DeleteRoom ¶
func (s *RoomService) DeleteRoom(ctx context.Context, req *livekit.DeleteRoomRequest) (*livekit.DeleteRoomResponse, error)
func (*RoomService) GetParticipant ¶
func (s *RoomService) GetParticipant(ctx context.Context, req *livekit.RoomParticipantIdentity) (res *livekit.ParticipantInfo, err error)
func (*RoomService) ListParticipants ¶
func (s *RoomService) ListParticipants(ctx context.Context, req *livekit.ListParticipantsRequest) (res *livekit.ListParticipantsResponse, err error)
func (*RoomService) ListRooms ¶
func (s *RoomService) ListRooms(ctx context.Context, req *livekit.ListRoomsRequest) (res *livekit.ListRoomsResponse, err error)
func (*RoomService) MutePublishedTrack ¶
func (s *RoomService) MutePublishedTrack(ctx context.Context, req *livekit.MuteRoomTrackRequest) (res *livekit.MuteRoomTrackResponse, err error)
func (*RoomService) RemoveParticipant ¶
func (s *RoomService) RemoveParticipant(ctx context.Context, req *livekit.RoomParticipantIdentity) (res *livekit.RemoveParticipantResponse, err error)
func (*RoomService) SendData ¶
func (s *RoomService) SendData(ctx context.Context, req *livekit.SendDataRequest) (*livekit.SendDataResponse, error)
func (*RoomService) UpdateParticipant ¶
func (s *RoomService) UpdateParticipant(ctx context.Context, req *livekit.UpdateParticipantRequest) (*livekit.ParticipantInfo, error)
func (*RoomService) UpdateRoomMetadata ¶
func (s *RoomService) UpdateRoomMetadata(ctx context.Context, req *livekit.UpdateRoomMetadataRequest) (*livekit.Room, error)
func (*RoomService) UpdateSubscriptions ¶
func (s *RoomService) UpdateSubscriptions(ctx context.Context, req *livekit.UpdateSubscriptionsRequest) (*livekit.UpdateSubscriptionsResponse, error)
type 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 ListRooms(ctx context.Context, names []livekit.RoomName) ([]*livekit.Room, error) LoadParticipant(ctx context.Context, roomName livekit.RoomName, identity livekit.ParticipantIdentity) (*livekit.ParticipantInfo, error) ListParticipants(ctx context.Context, roomName livekit.RoomName) ([]*livekit.ParticipantInfo, error) }
type StandardRoomAllocator ¶
type StandardRoomAllocator struct {
// contains filtered or unexported fields
}
func (*StandardRoomAllocator) CreateRoom ¶
func (r *StandardRoomAllocator) CreateRoom(ctx context.Context, req *livekit.CreateRoomRequest) (*livekit.Room, error)
CreateRoom creates a new room from a request and allocates it to a node to handle it'll also monitor its state, and cleans it up when appropriate
type WSSignalConnection ¶
type WSSignalConnection struct {
// contains filtered or unexported fields
}
func NewWSSignalConnection ¶
func NewWSSignalConnection(conn types.WebsocketClient) *WSSignalConnection
func (*WSSignalConnection) ReadRequest ¶
func (c *WSSignalConnection) ReadRequest() (*livekit.SignalRequest, error)
func (*WSSignalConnection) WriteResponse ¶
func (c *WSSignalConnection) WriteResponse(msg *livekit.SignalResponse) error