Documentation ¶
Index ¶
- Constants
- Variables
- func AppendLogFields(ctx context.Context, fields ...interface{})
- func EnsureAdminPermission(ctx context.Context, room livekit.RoomName) error
- func EnsureCreatePermission(ctx context.Context) error
- func EnsureIngressAdminPermission(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 GetClientIP(r *http.Request) string
- func GetGrants(ctx context.Context) *auth.ClaimGrants
- func InitializeRouter(conf *config.Config, currentNode routing.LocalNode) (routing.Router, error)
- func IsValidDomain(domain string) bool
- func NewEgressLauncher(client rpc.EgressClient, io IOClient) rtc.EgressLauncher
- func NewTurnServer(conf *config.Config, authHandler turn.AuthHandler, standalone bool) (*turn.Server, error)
- func SetAuthorizationToken(r *http.Request, token string)
- func TwirpLogger() *twirp.ServerHooks
- func TwirpRequestStatusReporter() *twirp.ServerHooks
- func WithGrants(ctx context.Context, grants *auth.ClaimGrants) context.Context
- type APIKeyAuthMiddleware
- type AgentHandler
- func (s *AgentHandler) CheckEnabled(_ context.Context, _ *rpc.CheckEnabledRequest) (*rpc.CheckEnabledResponse, error)
- func (s *AgentHandler) DrainConnections(interval time.Duration)
- func (s *AgentHandler) HandleConnection(ctx context.Context, conn *websocket.Conn)
- func (s *AgentHandler) JobRequest(ctx context.Context, job *livekit.Job) (*emptypb.Empty, error)
- func (s *AgentHandler) JobRequestAffinity(ctx context.Context, job *livekit.Job) float32
- func (s *AgentHandler) NumConnections() int
- func (s *AgentHandler) OnWorkerRegistered(handler func(handler *AgentHandler))
- type AgentService
- type EgressService
- func (s *EgressService) ListEgress(ctx context.Context, req *livekit.ListEgressRequest) (*livekit.ListEgressResponse, error)
- func (s *EgressService) StartParticipantEgress(ctx context.Context, req *livekit.ParticipantEgressRequest) (*livekit.EgressInfo, error)
- func (s *EgressService) StartRoomCompositeEgress(ctx context.Context, req *livekit.RoomCompositeEgressRequest) (*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) StartWebEgress(ctx context.Context, req *livekit.WebEgressRequest) (*livekit.EgressInfo, error)
- 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 IOClient
- type IOInfoService
- func (s *IOInfoService) CreateEgress(ctx context.Context, info *livekit.EgressInfo) (*emptypb.Empty, error)
- func (s *IOInfoService) EvaluateSIPDispatchRules(ctx context.Context, req *rpc.EvaluateSIPDispatchRulesRequest) (*rpc.EvaluateSIPDispatchRulesResponse, error)
- func (s *IOInfoService) GetEgress(ctx context.Context, req *rpc.GetEgressRequest) (*livekit.EgressInfo, error)
- func (s *IOInfoService) GetIngressInfo(ctx context.Context, req *rpc.GetIngressInfoRequest) (*rpc.GetIngressInfoResponse, error)
- func (s *IOInfoService) GetSIPTrunkAuthentication(ctx context.Context, req *rpc.GetSIPTrunkAuthenticationRequest) (*rpc.GetSIPTrunkAuthenticationResponse, error)
- func (s *IOInfoService) ListEgress(ctx context.Context, req *livekit.ListEgressRequest) (*livekit.ListEgressResponse, error)
- func (s *IOInfoService) Start() error
- func (s *IOInfoService) Stop()
- func (s *IOInfoService) UpdateEgress(ctx context.Context, info *livekit.EgressInfo) (*emptypb.Empty, error)
- func (s *IOInfoService) UpdateIngressState(ctx context.Context, req *rpc.UpdateIngressStateRequest) (*emptypb.Empty, error)
- func (s *IOInfoService) UpdateMetrics(ctx context.Context, req *rpc.UpdateMetricsRequest) (*emptypb.Empty, error)
- type IngressLauncher
- type IngressService
- func (s *IngressService) CreateIngress(ctx context.Context, req *livekit.CreateIngressRequest) (*livekit.IngressInfo, error)
- func (s *IngressService) CreateIngressWithUrl(ctx context.Context, urlStr string, req *livekit.CreateIngressRequest) (*livekit.IngressInfo, error)
- func (s *IngressService) DeleteIngress(ctx context.Context, req *livekit.DeleteIngressRequest) (*livekit.IngressInfo, error)
- func (s *IngressService) LaunchPullIngress(ctx context.Context, info *livekit.IngressInfo) (*livekit.IngressInfo, error)
- func (s *IngressService) ListIngress(ctx context.Context, req *livekit.ListIngressRequest) (*livekit.ListIngressResponse, error)
- func (s *IngressService) UpdateIngress(ctx context.Context, req *livekit.UpdateIngressRequest) (*livekit.IngressInfo, error)
- type IngressStore
- type LayoutMetadata
- type LivekitServer
- type LocalStore
- func (s *LocalStore) DeleteParticipant(_ context.Context, roomName livekit.RoomName, ...) error
- func (s *LocalStore) DeleteRoom(ctx context.Context, roomName livekit.RoomName) error
- func (s *LocalStore) ListParticipants(_ context.Context, roomName livekit.RoomName) ([]*livekit.ParticipantInfo, error)
- func (s *LocalStore) ListRooms(_ context.Context, roomNames []livekit.RoomName) ([]*livekit.Room, error)
- func (s *LocalStore) LoadParticipant(_ context.Context, roomName livekit.RoomName, ...) (*livekit.ParticipantInfo, error)
- func (s *LocalStore) LoadRoom(_ context.Context, roomName livekit.RoomName, includeInternal bool) (*livekit.Room, *livekit.RoomInternal, error)
- func (s *LocalStore) LockRoom(_ context.Context, _ livekit.RoomName, _ time.Duration) (string, error)
- func (s *LocalStore) StoreParticipant(_ context.Context, roomName livekit.RoomName, ...) error
- func (s *LocalStore) StoreRoom(_ context.Context, room *livekit.Room, internal *livekit.RoomInternal) error
- func (s *LocalStore) UnlockRoom(_ context.Context, _ livekit.RoomName, _ string) error
- type ObjectStore
- type RTCService
- type RedisStore
- func (s *RedisStore) CleanEndedEgress() error
- func (s *RedisStore) DeleteIngress(_ context.Context, info *livekit.IngressInfo) error
- func (s *RedisStore) DeleteParticipant(_ context.Context, roomName livekit.RoomName, ...) error
- func (s *RedisStore) DeleteRoom(ctx context.Context, roomName livekit.RoomName) error
- func (s *RedisStore) DeleteSIPDispatchRule(ctx context.Context, info *livekit.SIPDispatchRuleInfo) error
- func (s *RedisStore) DeleteSIPTrunk(ctx context.Context, info *livekit.SIPTrunkInfo) error
- func (s *RedisStore) ListEgress(_ context.Context, roomName livekit.RoomName, active bool) ([]*livekit.EgressInfo, error)
- func (s *RedisStore) ListIngress(_ context.Context, roomName livekit.RoomName) ([]*livekit.IngressInfo, error)
- func (s *RedisStore) ListParticipants(_ context.Context, roomName livekit.RoomName) ([]*livekit.ParticipantInfo, error)
- func (s *RedisStore) ListRooms(_ context.Context, roomNames []livekit.RoomName) ([]*livekit.Room, error)
- func (s *RedisStore) ListSIPDispatchRule(ctx context.Context) (infos []*livekit.SIPDispatchRuleInfo, err error)
- func (s *RedisStore) ListSIPTrunk(ctx context.Context) (infos []*livekit.SIPTrunkInfo, err error)
- func (s *RedisStore) LoadEgress(_ context.Context, egressID string) (*livekit.EgressInfo, error)
- func (s *RedisStore) LoadIngress(_ context.Context, ingressId string) (*livekit.IngressInfo, error)
- func (s *RedisStore) LoadIngressFromStreamKey(_ context.Context, streamKey string) (*livekit.IngressInfo, error)
- func (s *RedisStore) LoadParticipant(_ context.Context, roomName livekit.RoomName, ...) (*livekit.ParticipantInfo, error)
- func (s *RedisStore) LoadRoom(_ context.Context, roomName livekit.RoomName, includeInternal bool) (*livekit.Room, *livekit.RoomInternal, error)
- func (s *RedisStore) LoadSIPDispatchRule(ctx context.Context, sipDispatchRuleId string) (*livekit.SIPDispatchRuleInfo, error)
- func (s *RedisStore) LoadSIPTrunk(ctx context.Context, sipTrunkId string) (*livekit.SIPTrunkInfo, error)
- func (s *RedisStore) LockRoom(_ context.Context, roomName livekit.RoomName, duration time.Duration) (string, error)
- func (s *RedisStore) Start() error
- func (s *RedisStore) Stop()
- func (s *RedisStore) StoreEgress(_ context.Context, info *livekit.EgressInfo) error
- func (s *RedisStore) StoreIngress(ctx context.Context, info *livekit.IngressInfo) error
- func (s *RedisStore) StoreParticipant(_ context.Context, roomName livekit.RoomName, ...) error
- func (s *RedisStore) StoreRoom(_ context.Context, room *livekit.Room, internal *livekit.RoomInternal) error
- func (s *RedisStore) StoreSIPDispatchRule(ctx context.Context, info *livekit.SIPDispatchRuleInfo) error
- func (s *RedisStore) StoreSIPTrunk(ctx context.Context, info *livekit.SIPTrunkInfo) error
- func (s *RedisStore) UnlockRoom(_ context.Context, roomName livekit.RoomName, uid string) error
- func (s *RedisStore) UpdateEgress(_ context.Context, info *livekit.EgressInfo) error
- func (s *RedisStore) UpdateIngress(ctx context.Context, info *livekit.IngressInfo) error
- func (s *RedisStore) UpdateIngressState(ctx context.Context, ingressId string, state *livekit.IngressState) error
- type RoomAllocator
- type RoomManager
- func (r *RoomManager) CleanupRooms() error
- func (r *RoomManager) CloseIdleRooms()
- func (r *RoomManager) DeleteRoom(ctx context.Context, req *livekit.DeleteRoomRequest) (*livekit.DeleteRoomResponse, error)
- func (r *RoomManager) GetRoom(_ context.Context, roomName livekit.RoomName) *rtc.Room
- func (r *RoomManager) HasParticipants() bool
- func (r *RoomManager) MutePublishedTrack(ctx context.Context, req *livekit.MuteRoomTrackRequest) (*livekit.MuteRoomTrackResponse, error)
- func (r *RoomManager) RemoveParticipant(ctx context.Context, req *livekit.RoomParticipantIdentity) (*livekit.RemoveParticipantResponse, error)
- func (r *RoomManager) SendData(ctx context.Context, req *livekit.SendDataRequest) (*livekit.SendDataResponse, error)
- func (r *RoomManager) StartSession(ctx context.Context, roomName livekit.RoomName, pi routing.ParticipantInit, ...) error
- func (r *RoomManager) Stop()
- func (r *RoomManager) UpdateParticipant(ctx context.Context, req *livekit.UpdateParticipantRequest) (*livekit.ParticipantInfo, error)
- func (r *RoomManager) UpdateRoomMetadata(ctx context.Context, req *livekit.UpdateRoomMetadataRequest) (*livekit.Room, error)
- func (r *RoomManager) UpdateSubscriptions(ctx context.Context, req *livekit.UpdateSubscriptionsRequest) (*livekit.UpdateSubscriptionsResponse, error)
- type RoomService
- func (s *RoomService) CreateRoom(ctx context.Context, req *livekit.CreateRoomRequest) (*livekit.Room, error)
- func (s *RoomService) DeleteRoom(ctx context.Context, req *livekit.DeleteRoomRequest) (*livekit.DeleteRoomResponse, error)
- func (s *RoomService) GetParticipant(ctx context.Context, req *livekit.RoomParticipantIdentity) (*livekit.ParticipantInfo, error)
- func (s *RoomService) ListParticipants(ctx context.Context, req *livekit.ListParticipantsRequest) (*livekit.ListParticipantsResponse, error)
- func (s *RoomService) ListRooms(ctx context.Context, req *livekit.ListRoomsRequest) (*livekit.ListRoomsResponse, error)
- func (s *RoomService) MutePublishedTrack(ctx context.Context, req *livekit.MuteRoomTrackRequest) (*livekit.MuteRoomTrackResponse, error)
- func (s *RoomService) RemoveParticipant(ctx context.Context, req *livekit.RoomParticipantIdentity) (*livekit.RemoveParticipantResponse, 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 SIPService
- func (s *SIPService) CreateSIPDispatchRule(ctx context.Context, req *livekit.CreateSIPDispatchRuleRequest) (*livekit.SIPDispatchRuleInfo, error)
- func (s *SIPService) CreateSIPParticipant(ctx context.Context, req *livekit.CreateSIPParticipantRequest) (*livekit.SIPParticipantInfo, error)
- func (s *SIPService) CreateSIPTrunk(ctx context.Context, req *livekit.CreateSIPTrunkRequest) (*livekit.SIPTrunkInfo, error)
- func (s *SIPService) DeleteSIPDispatchRule(ctx context.Context, req *livekit.DeleteSIPDispatchRuleRequest) (*livekit.SIPDispatchRuleInfo, error)
- func (s *SIPService) DeleteSIPTrunk(ctx context.Context, req *livekit.DeleteSIPTrunkRequest) (*livekit.SIPTrunkInfo, error)
- func (s *SIPService) ListSIPDispatchRule(ctx context.Context, req *livekit.ListSIPDispatchRuleRequest) (*livekit.ListSIPDispatchRuleResponse, error)
- func (s *SIPService) ListSIPTrunk(ctx context.Context, req *livekit.ListSIPTrunkRequest) (*livekit.ListSIPTrunkResponse, error)
- type SIPStore
- type ServiceStore
- type SessionHandler
- type SignalServer
- type StandardRoomAllocator
- type TURNAuthHandler
- type WSSignalConnection
- func (c *WSSignalConnection) ReadRequest() (*livekit.SignalRequest, int, error)
- func (c *WSSignalConnection) ReadWorkerMessage() (*livekit.WorkerMessage, int, error)
- func (c *WSSignalConnection) WriteResponse(msg *livekit.SignalResponse) (int, error)
- func (c *WSSignalConnection) WriteServerMessage(msg *livekit.ServerMessage) (int, error)
Constants ¶
const ( VersionKey = "livekit_version" // RoomsKey is hash of room_name => Room proto RoomsKey = "rooms" RoomInternalKey = "room_internal" // EgressKey is a hash of egressID => egress info EgressKey = "egress" EndedEgressKey = "ended_egress" RoomEgressPrefix = "egress:room:" // IngressKey is a hash of ingressID => ingress info IngressKey = "ingress" StreamKeyKey = "{ingress}_stream_key" IngressStatePrefix = "{ingress}_state:" RoomIngressPrefix = "room_{ingress}:" SIPTrunkKey = "sip_trunk" SIPDispatchRuleKey = "sip_dispatch_rule" // RoomParticipantsPrefix is hash of participant_name => ParticipantInfo RoomParticipantsPrefix = "room_participants:" // RoomLockPrefix is a simple key containing a provided lock uid RoomLockPrefix = "room_lock:" )
const AgentServiceVersion = "0.1.0"
const (
LivekitRealm = "livekit"
)
Variables ¶
var ( ErrPermissionDenied = errors.New("permissions denied") ErrMissingAuthorization = errors.New("invalid authorization header. Must start with " + bearerPrefix) ErrInvalidAuthorizationToken = errors.New("invalid authorization token") ErrInvalidAPIKey = errors.New("invalid API key") )
var ( ErrEgressNotFound = psrpc.NewErrorf(psrpc.NotFound, "egress does not exist") ErrEgressNotConnected = psrpc.NewErrorf(psrpc.Internal, "egress not connected (redis required)") ErrIdentityEmpty = psrpc.NewErrorf(psrpc.InvalidArgument, "identity cannot be empty") ErrIngressNotConnected = psrpc.NewErrorf(psrpc.Internal, "ingress not connected (redis required)") ErrIngressNotFound = psrpc.NewErrorf(psrpc.NotFound, "ingress does not exist") ErrIngressNonReusable = psrpc.NewErrorf(psrpc.InvalidArgument, "ingress is not reusable and cannot be modified") ErrMetadataExceedsLimits = psrpc.NewErrorf(psrpc.InvalidArgument, "metadata size exceeds limits") ErrOperationFailed = psrpc.NewErrorf(psrpc.Internal, "operation cannot be completed") ErrParticipantNotFound = psrpc.NewErrorf(psrpc.NotFound, "participant does not exist") ErrRoomNotFound = psrpc.NewErrorf(psrpc.NotFound, "requested room does not exist") ErrRoomLockFailed = psrpc.NewErrorf(psrpc.Internal, "could not lock room") ErrRoomUnlockFailed = psrpc.NewErrorf(psrpc.Internal, "could not unlock room, lock token does not match") ErrRemoteUnmuteNoteEnabled = psrpc.NewErrorf(psrpc.FailedPrecondition, "remote unmute not enabled") ErrTrackNotFound = psrpc.NewErrorf(psrpc.NotFound, "track is not found") ErrWebHookMissingAPIKey = psrpc.NewErrorf(psrpc.InvalidArgument, "api_key is required to use webhooks") ErrSIPNotConnected = psrpc.NewErrorf(psrpc.Internal, "sip not connected (redis required)") ErrSIPTrunkNotFound = psrpc.NewErrorf(psrpc.NotFound, "requested sip trunk does not exist") ErrSIPDispatchRuleNotFound = psrpc.NewErrorf(psrpc.NotFound, "requested sip dispatch rule does not exist") ErrSIPParticipantNotFound = psrpc.NewErrorf(psrpc.NotFound, "requested sip participant does not exist") )
Functions ¶
func AppendLogFields ¶
func EnsureAdminPermission ¶
func EnsureCreatePermission ¶
func EnsureJoinPermission ¶
func EnsureListPermission ¶
func EnsureRecordPermission ¶
func GetClientIP ¶
func InitializeRouter ¶
func IsValidDomain ¶
func NewEgressLauncher ¶
func NewEgressLauncher(client rpc.EgressClient, io IOClient) rtc.EgressLauncher
func NewTurnServer ¶
func SetAuthorizationToken ¶
func TwirpLogger ¶
func TwirpLogger() *twirp.ServerHooks
logging handling inspired by https://github.com/bakins/twirpzap License: Apache-2.0
func TwirpRequestStatusReporter ¶
func TwirpRequestStatusReporter() *twirp.ServerHooks
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 AgentHandler ¶
type AgentHandler struct {
// contains filtered or unexported fields
}
func NewAgentHandler ¶
func NewAgentHandler(agentServer rpc.AgentInternalServer, roomTopic, publisherTopic string) *AgentHandler
func (*AgentHandler) CheckEnabled ¶
func (s *AgentHandler) CheckEnabled(_ context.Context, _ *rpc.CheckEnabledRequest) (*rpc.CheckEnabledResponse, error)
func (*AgentHandler) DrainConnections ¶
func (s *AgentHandler) DrainConnections(interval time.Duration)
func (*AgentHandler) HandleConnection ¶
func (s *AgentHandler) HandleConnection(ctx context.Context, conn *websocket.Conn)
func (*AgentHandler) JobRequest ¶
func (*AgentHandler) JobRequestAffinity ¶
func (*AgentHandler) NumConnections ¶
func (s *AgentHandler) NumConnections() int
func (*AgentHandler) OnWorkerRegistered ¶
func (s *AgentHandler) OnWorkerRegistered(handler func(handler *AgentHandler))
OnWorkerRegistered registers a callback to be called when the first worker of each type is registered
type AgentService ¶
type AgentService struct { *AgentHandler // contains filtered or unexported fields }
func NewAgentService ¶
func NewAgentService(bus psrpc.MessageBus) (*AgentService, error)
func (*AgentService) ServeHTTP ¶
func (s *AgentService) ServeHTTP(writer http.ResponseWriter, r *http.Request)
type EgressService ¶
type EgressService struct {
// contains filtered or unexported fields
}
func NewEgressService ¶
func NewEgressService( client rpc.EgressClient, launcher rtc.EgressLauncher, store ServiceStore, io IOClient, rs livekit.RoomService, ) *EgressService
func (*EgressService) ListEgress ¶
func (s *EgressService) ListEgress(ctx context.Context, req *livekit.ListEgressRequest) (*livekit.ListEgressResponse, error)
func (*EgressService) StartParticipantEgress ¶
func (s *EgressService) StartParticipantEgress(ctx context.Context, req *livekit.ParticipantEgressRequest) (*livekit.EgressInfo, error)
func (*EgressService) StartRoomCompositeEgress ¶
func (s *EgressService) StartRoomCompositeEgress(ctx context.Context, req *livekit.RoomCompositeEgressRequest) (*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) StartWebEgress ¶
func (s *EgressService) StartWebEgress(ctx context.Context, req *livekit.WebEgressRequest) (*livekit.EgressInfo, error)
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 { StoreEgress(ctx context.Context, info *livekit.EgressInfo) error LoadEgress(ctx context.Context, egressID string) (*livekit.EgressInfo, error) ListEgress(ctx context.Context, roomName livekit.RoomName, active bool) ([]*livekit.EgressInfo, error) UpdateEgress(ctx context.Context, info *livekit.EgressInfo) error }
type IOClient ¶
type IOClient interface { CreateEgress(ctx context.Context, info *livekit.EgressInfo) (*emptypb.Empty, error) GetEgress(ctx context.Context, req *rpc.GetEgressRequest) (*livekit.EgressInfo, error) ListEgress(ctx context.Context, req *livekit.ListEgressRequest) (*livekit.ListEgressResponse, error) }
type IOInfoService ¶
type IOInfoService struct {
// contains filtered or unexported fields
}
func NewIOInfoService ¶
func NewIOInfoService( bus psrpc.MessageBus, es EgressStore, is IngressStore, ss SIPStore, ts telemetry.TelemetryService, ) (*IOInfoService, error)
func (*IOInfoService) CreateEgress ¶
func (s *IOInfoService) CreateEgress(ctx context.Context, info *livekit.EgressInfo) (*emptypb.Empty, error)
func (*IOInfoService) EvaluateSIPDispatchRules ¶
func (s *IOInfoService) EvaluateSIPDispatchRules(ctx context.Context, req *rpc.EvaluateSIPDispatchRulesRequest) (*rpc.EvaluateSIPDispatchRulesResponse, error)
func (*IOInfoService) GetEgress ¶
func (s *IOInfoService) GetEgress(ctx context.Context, req *rpc.GetEgressRequest) (*livekit.EgressInfo, error)
func (*IOInfoService) GetIngressInfo ¶
func (s *IOInfoService) GetIngressInfo(ctx context.Context, req *rpc.GetIngressInfoRequest) (*rpc.GetIngressInfoResponse, error)
func (*IOInfoService) GetSIPTrunkAuthentication ¶
func (s *IOInfoService) GetSIPTrunkAuthentication(ctx context.Context, req *rpc.GetSIPTrunkAuthenticationRequest) (*rpc.GetSIPTrunkAuthenticationResponse, error)
func (*IOInfoService) ListEgress ¶
func (s *IOInfoService) ListEgress(ctx context.Context, req *livekit.ListEgressRequest) (*livekit.ListEgressResponse, error)
func (*IOInfoService) Start ¶
func (s *IOInfoService) Start() error
func (*IOInfoService) Stop ¶
func (s *IOInfoService) Stop()
func (*IOInfoService) UpdateEgress ¶
func (s *IOInfoService) UpdateEgress(ctx context.Context, info *livekit.EgressInfo) (*emptypb.Empty, error)
func (*IOInfoService) UpdateIngressState ¶
func (s *IOInfoService) UpdateIngressState(ctx context.Context, req *rpc.UpdateIngressStateRequest) (*emptypb.Empty, error)
func (*IOInfoService) UpdateMetrics ¶
func (s *IOInfoService) UpdateMetrics(ctx context.Context, req *rpc.UpdateMetricsRequest) (*emptypb.Empty, error)
type IngressLauncher ¶
type IngressLauncher interface {
LaunchPullIngress(ctx context.Context, info *livekit.IngressInfo) (*livekit.IngressInfo, error)
}
type IngressService ¶
type IngressService struct {
// contains filtered or unexported fields
}
func NewIngressService ¶
func NewIngressService( conf *config.IngressConfig, nodeID livekit.NodeID, bus psrpc.MessageBus, psrpcClient rpc.IngressClient, store IngressStore, rs livekit.RoomService, ts telemetry.TelemetryService, ) *IngressService
func NewIngressServiceWithIngressLauncher ¶
func NewIngressServiceWithIngressLauncher( conf *config.IngressConfig, nodeID livekit.NodeID, bus psrpc.MessageBus, psrpcClient rpc.IngressClient, store IngressStore, rs livekit.RoomService, ts telemetry.TelemetryService, launcher IngressLauncher, ) *IngressService
func (*IngressService) CreateIngress ¶
func (s *IngressService) CreateIngress(ctx context.Context, req *livekit.CreateIngressRequest) (*livekit.IngressInfo, error)
func (*IngressService) CreateIngressWithUrl ¶
func (s *IngressService) CreateIngressWithUrl(ctx context.Context, urlStr string, req *livekit.CreateIngressRequest) (*livekit.IngressInfo, error)
func (*IngressService) DeleteIngress ¶
func (s *IngressService) DeleteIngress(ctx context.Context, req *livekit.DeleteIngressRequest) (*livekit.IngressInfo, error)
func (*IngressService) LaunchPullIngress ¶
func (s *IngressService) LaunchPullIngress(ctx context.Context, info *livekit.IngressInfo) (*livekit.IngressInfo, error)
func (*IngressService) ListIngress ¶
func (s *IngressService) ListIngress(ctx context.Context, req *livekit.ListIngressRequest) (*livekit.ListIngressResponse, error)
func (*IngressService) UpdateIngress ¶
func (s *IngressService) UpdateIngress(ctx context.Context, req *livekit.UpdateIngressRequest) (*livekit.IngressInfo, error)
type IngressStore ¶
type IngressStore interface { StoreIngress(ctx context.Context, info *livekit.IngressInfo) error LoadIngress(ctx context.Context, ingressID string) (*livekit.IngressInfo, error) LoadIngressFromStreamKey(ctx context.Context, streamKey string) (*livekit.IngressInfo, error) ListIngress(ctx context.Context, roomName livekit.RoomName) ([]*livekit.IngressInfo, error) UpdateIngress(ctx context.Context, info *livekit.IngressInfo) error UpdateIngressState(ctx context.Context, ingressId string, state *livekit.IngressState) error DeleteIngress(ctx context.Context, info *livekit.IngressInfo) 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, ingressService *IngressService, sipService *SIPService, ioService *IOInfoService, rtcService *RTCService, agentService *AgentService, keyProvider auth.KeyProvider, router routing.Router, roomManager *RoomManager, signalServer *SignalServer, 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) DeleteParticipant ¶
func (s *LocalStore) DeleteParticipant(_ context.Context, roomName livekit.RoomName, identity livekit.ParticipantIdentity) error
func (*LocalStore) DeleteRoom ¶
func (*LocalStore) ListParticipants ¶
func (s *LocalStore) ListParticipants(_ context.Context, roomName livekit.RoomName) ([]*livekit.ParticipantInfo, error)
func (*LocalStore) LoadParticipant ¶
func (s *LocalStore) LoadParticipant(_ context.Context, roomName livekit.RoomName, identity livekit.ParticipantIdentity) (*livekit.ParticipantInfo, error)
func (*LocalStore) StoreParticipant ¶
func (s *LocalStore) StoreParticipant(_ context.Context, roomName livekit.RoomName, participant *livekit.ParticipantInfo) error
func (*LocalStore) StoreRoom ¶
func (s *LocalStore) StoreRoom(_ context.Context, room *livekit.Room, internal *livekit.RoomInternal) error
func (*LocalStore) UnlockRoom ¶
type ObjectStore ¶
type ObjectStore interface { ServiceStore // enable locking on a specific room to prevent race // returns a (lock uuid, error) LockRoom(ctx context.Context, roomName livekit.RoomName, duration time.Duration) (string, error) UnlockRoom(ctx context.Context, roomName livekit.RoomName, uid string) error StoreRoom(ctx context.Context, room *livekit.Room, internal *livekit.RoomInternal) 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, agentClient rtc.AgentClient, telemetry telemetry.TelemetryService, ) *RTCService
func (*RTCService) DrainConnections ¶
func (s *RTCService) DrainConnections(interval time.Duration)
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 RedisStore ¶
type RedisStore struct {
// contains filtered or unexported fields
}
func NewRedisStore ¶
func NewRedisStore(rc redis.UniversalClient) *RedisStore
func (*RedisStore) CleanEndedEgress ¶
func (s *RedisStore) CleanEndedEgress() error
func (*RedisStore) DeleteIngress ¶
func (s *RedisStore) DeleteIngress(_ context.Context, info *livekit.IngressInfo) error
func (*RedisStore) DeleteParticipant ¶
func (s *RedisStore) DeleteParticipant(_ context.Context, roomName livekit.RoomName, identity livekit.ParticipantIdentity) error
func (*RedisStore) DeleteRoom ¶
func (*RedisStore) DeleteSIPDispatchRule ¶
func (s *RedisStore) DeleteSIPDispatchRule(ctx context.Context, info *livekit.SIPDispatchRuleInfo) error
func (*RedisStore) DeleteSIPTrunk ¶
func (s *RedisStore) DeleteSIPTrunk(ctx context.Context, info *livekit.SIPTrunkInfo) error
func (*RedisStore) ListEgress ¶
func (s *RedisStore) ListEgress(_ context.Context, roomName livekit.RoomName, active bool) ([]*livekit.EgressInfo, error)
func (*RedisStore) ListIngress ¶
func (s *RedisStore) ListIngress(_ context.Context, roomName livekit.RoomName) ([]*livekit.IngressInfo, error)
func (*RedisStore) ListParticipants ¶
func (s *RedisStore) ListParticipants(_ context.Context, roomName livekit.RoomName) ([]*livekit.ParticipantInfo, error)
func (*RedisStore) ListSIPDispatchRule ¶
func (s *RedisStore) ListSIPDispatchRule(ctx context.Context) (infos []*livekit.SIPDispatchRuleInfo, err error)
func (*RedisStore) ListSIPTrunk ¶
func (s *RedisStore) ListSIPTrunk(ctx context.Context) (infos []*livekit.SIPTrunkInfo, err error)
func (*RedisStore) LoadEgress ¶
func (s *RedisStore) LoadEgress(_ context.Context, egressID string) (*livekit.EgressInfo, error)
func (*RedisStore) LoadIngress ¶
func (s *RedisStore) LoadIngress(_ context.Context, ingressId string) (*livekit.IngressInfo, error)
func (*RedisStore) LoadIngressFromStreamKey ¶
func (s *RedisStore) LoadIngressFromStreamKey(_ context.Context, streamKey string) (*livekit.IngressInfo, error)
func (*RedisStore) LoadParticipant ¶
func (s *RedisStore) LoadParticipant(_ context.Context, roomName livekit.RoomName, identity livekit.ParticipantIdentity) (*livekit.ParticipantInfo, error)
func (*RedisStore) LoadSIPDispatchRule ¶
func (s *RedisStore) LoadSIPDispatchRule(ctx context.Context, sipDispatchRuleId string) (*livekit.SIPDispatchRuleInfo, error)
func (*RedisStore) LoadSIPTrunk ¶
func (s *RedisStore) LoadSIPTrunk(ctx context.Context, sipTrunkId string) (*livekit.SIPTrunkInfo, error)
func (*RedisStore) Start ¶
func (s *RedisStore) Start() error
func (*RedisStore) Stop ¶
func (s *RedisStore) Stop()
func (*RedisStore) StoreEgress ¶
func (s *RedisStore) StoreEgress(_ context.Context, info *livekit.EgressInfo) error
func (*RedisStore) StoreIngress ¶
func (s *RedisStore) StoreIngress(ctx context.Context, info *livekit.IngressInfo) error
func (*RedisStore) StoreParticipant ¶
func (s *RedisStore) StoreParticipant(_ context.Context, roomName livekit.RoomName, participant *livekit.ParticipantInfo) error
func (*RedisStore) StoreRoom ¶
func (s *RedisStore) StoreRoom(_ context.Context, room *livekit.Room, internal *livekit.RoomInternal) error
func (*RedisStore) StoreSIPDispatchRule ¶
func (s *RedisStore) StoreSIPDispatchRule(ctx context.Context, info *livekit.SIPDispatchRuleInfo) error
func (*RedisStore) StoreSIPTrunk ¶
func (s *RedisStore) StoreSIPTrunk(ctx context.Context, info *livekit.SIPTrunkInfo) error
func (*RedisStore) UnlockRoom ¶
func (*RedisStore) UpdateEgress ¶
func (s *RedisStore) UpdateEgress(_ context.Context, info *livekit.EgressInfo) error
func (*RedisStore) UpdateIngress ¶
func (s *RedisStore) UpdateIngress(ctx context.Context, info *livekit.IngressInfo) error
func (*RedisStore) UpdateIngressState ¶
func (s *RedisStore) UpdateIngressState(ctx context.Context, ingressId string, state *livekit.IngressState) error
type RoomAllocator ¶
type RoomAllocator interface { CreateRoom(ctx context.Context, req *livekit.CreateRoomRequest) (*livekit.Room, bool, error) ValidateCreateRoom(ctx context.Context, roomName livekit.RoomName) 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, agentClient rtc.AgentClient, egressLauncher rtc.EgressLauncher, versionGenerator utils.TimedVersionGenerator, turnAuthHandler *TURNAuthHandler, bus psrpc.MessageBus, ) (*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 ¶
func (r *RoomManager) DeleteRoom(ctx context.Context, req *livekit.DeleteRoomRequest) (*livekit.DeleteRoomResponse, error)
func (*RoomManager) HasParticipants ¶
func (r *RoomManager) HasParticipants() bool
func (*RoomManager) MutePublishedTrack ¶
func (r *RoomManager) MutePublishedTrack(ctx context.Context, req *livekit.MuteRoomTrackRequest) (*livekit.MuteRoomTrackResponse, error)
func (*RoomManager) RemoveParticipant ¶
func (r *RoomManager) RemoveParticipant(ctx context.Context, req *livekit.RoomParticipantIdentity) (*livekit.RemoveParticipantResponse, error)
func (*RoomManager) SendData ¶
func (r *RoomManager) SendData(ctx context.Context, req *livekit.SendDataRequest) (*livekit.SendDataResponse, error)
func (*RoomManager) StartSession ¶
func (r *RoomManager) StartSession( ctx context.Context, roomName livekit.RoomName, pi routing.ParticipantInit, requestSource routing.MessageSource, responseSink routing.MessageSink, ) error
StartSession starts WebRTC session when a new participant is connected, takes place on RTC node
func (*RoomManager) Stop ¶
func (r *RoomManager) Stop()
func (*RoomManager) UpdateParticipant ¶
func (r *RoomManager) UpdateParticipant(ctx context.Context, req *livekit.UpdateParticipantRequest) (*livekit.ParticipantInfo, error)
func (*RoomManager) UpdateRoomMetadata ¶
func (r *RoomManager) UpdateRoomMetadata(ctx context.Context, req *livekit.UpdateRoomMetadataRequest) (*livekit.Room, error)
func (*RoomManager) UpdateSubscriptions ¶
func (r *RoomManager) UpdateSubscriptions(ctx context.Context, req *livekit.UpdateSubscriptionsRequest) (*livekit.UpdateSubscriptionsResponse, error)
type RoomService ¶
type RoomService struct {
// contains filtered or unexported fields
}
A rooms service that supports a single node
func NewRoomService ¶
func NewRoomService( roomConf config.RoomConfig, apiConf config.APIConfig, psrpcConf rpc.PSRPCConfig, router routing.MessageRouter, roomAllocator RoomAllocator, serviceStore ServiceStore, agentClient rtc.AgentClient, egressLauncher rtc.EgressLauncher, topicFormatter rpc.TopicFormatter, roomClient rpc.TypedRoomClient, participantClient rpc.TypedParticipantClient, ) (svc *RoomService, err error)
func (*RoomService) CreateRoom ¶
func (s *RoomService) CreateRoom(ctx context.Context, req *livekit.CreateRoomRequest) (*livekit.Room, 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) (*livekit.ParticipantInfo, error)
func (*RoomService) ListParticipants ¶
func (s *RoomService) ListParticipants(ctx context.Context, req *livekit.ListParticipantsRequest) (*livekit.ListParticipantsResponse, error)
func (*RoomService) ListRooms ¶
func (s *RoomService) ListRooms(ctx context.Context, req *livekit.ListRoomsRequest) (*livekit.ListRoomsResponse, error)
func (*RoomService) MutePublishedTrack ¶
func (s *RoomService) MutePublishedTrack(ctx context.Context, req *livekit.MuteRoomTrackRequest) (*livekit.MuteRoomTrackResponse, error)
func (*RoomService) RemoveParticipant ¶
func (s *RoomService) RemoveParticipant(ctx context.Context, req *livekit.RoomParticipantIdentity) (*livekit.RemoveParticipantResponse, 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 SIPService ¶
type SIPService struct {
// contains filtered or unexported fields
}
func NewSIPService ¶
func NewSIPService( conf *config.SIPConfig, nodeID livekit.NodeID, bus psrpc.MessageBus, psrpcClient rpc.SIPClient, store SIPStore, rs livekit.RoomService, ts telemetry.TelemetryService, ) *SIPService
func (*SIPService) CreateSIPDispatchRule ¶
func (s *SIPService) CreateSIPDispatchRule(ctx context.Context, req *livekit.CreateSIPDispatchRuleRequest) (*livekit.SIPDispatchRuleInfo, error)
func (*SIPService) CreateSIPParticipant ¶
func (s *SIPService) CreateSIPParticipant(ctx context.Context, req *livekit.CreateSIPParticipantRequest) (*livekit.SIPParticipantInfo, error)
func (*SIPService) CreateSIPTrunk ¶
func (s *SIPService) CreateSIPTrunk(ctx context.Context, req *livekit.CreateSIPTrunkRequest) (*livekit.SIPTrunkInfo, error)
func (*SIPService) DeleteSIPDispatchRule ¶
func (s *SIPService) DeleteSIPDispatchRule(ctx context.Context, req *livekit.DeleteSIPDispatchRuleRequest) (*livekit.SIPDispatchRuleInfo, error)
func (*SIPService) DeleteSIPTrunk ¶
func (s *SIPService) DeleteSIPTrunk(ctx context.Context, req *livekit.DeleteSIPTrunkRequest) (*livekit.SIPTrunkInfo, error)
func (*SIPService) ListSIPDispatchRule ¶
func (s *SIPService) ListSIPDispatchRule(ctx context.Context, req *livekit.ListSIPDispatchRuleRequest) (*livekit.ListSIPDispatchRuleResponse, error)
func (*SIPService) ListSIPTrunk ¶
func (s *SIPService) ListSIPTrunk(ctx context.Context, req *livekit.ListSIPTrunkRequest) (*livekit.ListSIPTrunkResponse, error)
type SIPStore ¶
type SIPStore interface { StoreSIPTrunk(ctx context.Context, info *livekit.SIPTrunkInfo) error LoadSIPTrunk(ctx context.Context, sipTrunkID string) (*livekit.SIPTrunkInfo, error) ListSIPTrunk(ctx context.Context) ([]*livekit.SIPTrunkInfo, error) DeleteSIPTrunk(ctx context.Context, info *livekit.SIPTrunkInfo) error StoreSIPDispatchRule(ctx context.Context, info *livekit.SIPDispatchRuleInfo) error LoadSIPDispatchRule(ctx context.Context, sipDispatchRuleID string) (*livekit.SIPDispatchRuleInfo, error) ListSIPDispatchRule(ctx context.Context) ([]*livekit.SIPDispatchRuleInfo, error) DeleteSIPDispatchRule(ctx context.Context, info *livekit.SIPDispatchRuleInfo) error }
type ServiceStore ¶
type ServiceStore interface { LoadRoom(ctx context.Context, roomName livekit.RoomName, includeInternal bool) (*livekit.Room, *livekit.RoomInternal, error) DeleteRoom(ctx context.Context, roomName livekit.RoomName) error // ListRooms returns currently active rooms. if names is not nil, it'll filter and return // only rooms that match ListRooms(ctx context.Context, roomNames []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 SessionHandler ¶
type SessionHandler interface { Logger(ctx context.Context) logger.Logger HandleSession( ctx context.Context, roomName livekit.RoomName, pi routing.ParticipantInit, connectionID livekit.ConnectionID, requestSource routing.MessageSource, responseSink routing.MessageSink, ) error }
type SignalServer ¶
type SignalServer struct {
// contains filtered or unexported fields
}
func NewDefaultSignalServer ¶
func NewDefaultSignalServer( currentNode routing.LocalNode, bus psrpc.MessageBus, config config.SignalRelayConfig, router routing.Router, roomManager *RoomManager, ) (r *SignalServer, err error)
func NewSignalServer ¶
func NewSignalServer( nodeID livekit.NodeID, region string, bus psrpc.MessageBus, config config.SignalRelayConfig, sessionHandler SessionHandler, ) (*SignalServer, error)
func (*SignalServer) Start ¶
func (s *SignalServer) Start() error
func (*SignalServer) Stop ¶
func (r *SignalServer) Stop()
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, bool, 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
func (*StandardRoomAllocator) ValidateCreateRoom ¶
type TURNAuthHandler ¶
type TURNAuthHandler struct {
// contains filtered or unexported fields
}
func NewTURNAuthHandler ¶
func NewTURNAuthHandler(keyProvider auth.KeyProvider) *TURNAuthHandler
func (*TURNAuthHandler) CreatePassword ¶
func (h *TURNAuthHandler) CreatePassword(apiKey string, pID livekit.ParticipantID) (string, error)
func (*TURNAuthHandler) CreateUsername ¶
func (h *TURNAuthHandler) CreateUsername(apiKey string, pID livekit.ParticipantID) string
func (*TURNAuthHandler) HandleAuth ¶
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, int, error)
func (*WSSignalConnection) ReadWorkerMessage ¶
func (c *WSSignalConnection) ReadWorkerMessage() (*livekit.WorkerMessage, int, error)
func (*WSSignalConnection) WriteResponse ¶
func (c *WSSignalConnection) WriteResponse(msg *livekit.SignalResponse) (int, error)
func (*WSSignalConnection) WriteServerMessage ¶
func (c *WSSignalConnection) WriteServerMessage(msg *livekit.ServerMessage) (int, error)