Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BytesTrackIDForParticipantID ¶ added in v1.3.2
func BytesTrackIDForParticipantID(typ BytesTrackType, participantID livekit.ParticipantID) livekit.TrackID
Types ¶
type AnalyticsService ¶ added in v0.15.0
type AnalyticsService interface {
SendStats(ctx context.Context, stats []*livekit.AnalyticsStat)
SendEvent(ctx context.Context, events *livekit.AnalyticsEvent)
}
func NewAnalyticsService ¶ added in v0.15.0
func NewAnalyticsService(_ *config.Config, currentNode routing.LocalNode) AnalyticsService
type BytesTrackStats ¶ added in v1.3.2
type BytesTrackStats struct {
// contains filtered or unexported fields
}
stats for signal and data channel
func NewBytesTrackStats ¶ added in v1.3.2
func NewBytesTrackStats(trackID livekit.TrackID, pID livekit.ParticipantID, telemetry TelemetryService) *BytesTrackStats
func (*BytesTrackStats) AddBytes ¶ added in v1.3.2
func (s *BytesTrackStats) AddBytes(bytes uint64, isSend bool)
func (*BytesTrackStats) Report ¶ added in v1.3.2
func (s *BytesTrackStats) Report()
type BytesTrackType ¶ added in v1.3.2
type BytesTrackType string
const ( BytesTrackTypeData BytesTrackType = "DT" BytesTrackTypeSignal BytesTrackType = "SG" )
type Listener ¶ added in v1.2.1
func NewListener ¶ added in v1.2.1
type PacketConn ¶ added in v1.2.1
type PacketConn struct {
net.PacketConn
// contains filtered or unexported fields
}
func NewPacketConn ¶ added in v1.2.1
func NewPacketConn(c net.PacketConn, direction prometheus.Direction) *PacketConn
func (*PacketConn) Close ¶ added in v1.2.1
func (c *PacketConn) Close() error
type RelayAddressGenerator ¶ added in v1.2.1
type RelayAddressGenerator struct {
turn.RelayAddressGenerator
}
func NewRelayAddressGenerator ¶ added in v1.2.1
func NewRelayAddressGenerator(g turn.RelayAddressGenerator) *RelayAddressGenerator
func (*RelayAddressGenerator) AllocateConn ¶ added in v1.2.1
func (*RelayAddressGenerator) AllocatePacketConn ¶ added in v1.2.1
func (g *RelayAddressGenerator) AllocatePacketConn(network string, requestedPort int) (net.PacketConn, net.Addr, error)
type StatsWorker ¶
type StatsWorker struct {
// contains filtered or unexported fields
}
StatsWorker handles participant stats
func (*StatsWorker) Close ¶
func (s *StatsWorker) Close()
func (*StatsWorker) ClosedAt ¶ added in v1.2.0
func (s *StatsWorker) ClosedAt() time.Time
func (*StatsWorker) Flush ¶ added in v1.2.2
func (s *StatsWorker) Flush()
func (*StatsWorker) OnTrackStat ¶ added in v0.15.3
func (s *StatsWorker) OnTrackStat(trackID livekit.TrackID, direction livekit.StreamType, stat *livekit.AnalyticsStat)
func (*StatsWorker) ParticipantID ¶ added in v1.2.0
func (s *StatsWorker) ParticipantID() livekit.ParticipantID
type TelemetryService ¶
type TelemetryService interface {
// stats
TrackStats(streamType livekit.StreamType, participantID livekit.ParticipantID, trackID livekit.TrackID, stat *livekit.AnalyticsStat)
// events
RoomStarted(ctx context.Context, room *livekit.Room)
RoomEnded(ctx context.Context, room *livekit.Room)
ParticipantJoined(ctx context.Context, room *livekit.Room, participant *livekit.ParticipantInfo, clientInfo *livekit.ClientInfo, clientMeta *livekit.AnalyticsClientMeta)
ParticipantActive(ctx context.Context, room *livekit.Room, participant *livekit.ParticipantInfo, clientMeta *livekit.AnalyticsClientMeta)
ParticipantLeft(ctx context.Context, room *livekit.Room, participant *livekit.ParticipantInfo)
TrackPublished(ctx context.Context, participantID livekit.ParticipantID, identity livekit.ParticipantIdentity, track *livekit.TrackInfo)
TrackUnpublished(ctx context.Context, participantID livekit.ParticipantID, identity livekit.ParticipantIdentity, track *livekit.TrackInfo, ssrc uint32)
TrackSubscribed(ctx context.Context, participantID livekit.ParticipantID, track *livekit.TrackInfo, publisher *livekit.ParticipantInfo)
TrackUnsubscribed(ctx context.Context, participantID livekit.ParticipantID, track *livekit.TrackInfo)
TrackPublishedUpdate(ctx context.Context, participantID livekit.ParticipantID, track *livekit.TrackInfo)
TrackMaxSubscribedVideoQuality(ctx context.Context, participantID livekit.ParticipantID, track *livekit.TrackInfo, mime string, maxQuality livekit.VideoQuality)
EgressStarted(ctx context.Context, info *livekit.EgressInfo)
EgressEnded(ctx context.Context, info *livekit.EgressInfo)
// helpers
AnalyticsService
NotifyEvent(ctx context.Context, event *livekit.WebhookEvent)
FlushStats()
}
func NewTelemetryService ¶
func NewTelemetryService(notifier webhook.Notifier, analytics AnalyticsService) TelemetryService
Source Files
¶
Click to show internal directories.
Click to hide internal directories.