telemetry

package
v0.15.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 6, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NanoSecondsInMicroSecond        = 1000
	MicroSecondsInSecond     int64  = 1000000
	NtpJan1970Sec            int64  = 2208988800
	MaxCompactNtp            uint32 = 0xFFFFFFFF
	CompactNtpInSecond       int64  = 0x10000
	NtpInSecond              int64  = 1 << 32
)

Variables

This section is empty.

Functions

func GetRttMs added in v0.15.2

func GetRttMs(packet *rtcp.ReceiverReport) int64

func NtpToTimeMicros added in v0.15.2

func NtpToTimeMicros(val NtpTime) int64

func SaturatedUsToCompactNtp added in v0.15.2

func SaturatedUsToCompactNtp(us int64) uint32

SaturatedUsToCompactNtp convert us to rtp compact ntptime field (from webrtc)

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 NtpTime added in v0.15.2

type NtpTime struct {
	// contains filtered or unexported fields
}

NtpTime represents ntp time in rtp

func NtpCompactToTime added in v0.15.2

func NtpCompactToTime(val uint32) NtpTime

func TimeMicrosToNtp added in v0.15.2

func TimeMicrosToNtp(time_us int64) *NtpTime

TimeMicrosToNtp convert us to NtpTime (from webrtc)

func (*NtpTime) Compact added in v0.15.2

func (n *NtpTime) Compact() uint32

Compact convert ntptime to rtp compact ntptime field (middle 32 bit, uint32)

func (*NtpTime) FromCompact added in v0.15.2

func (n *NtpTime) FromCompact(val uint32)

FromCompact set ntp fields from compact ntp filed(32bit)

func (*NtpTime) Ntp added in v0.15.2

func (n *NtpTime) Ntp() uint64

Ntp return rtp ntptime field

func (*NtpTime) Set added in v0.15.2

func (n *NtpTime) Set(val uint64)

Set set ntptime from rtp's ntptime field (uint64)

type Stats added in v0.14.2

type Stats struct {
	// contains filtered or unexported fields
}

type StatsWorker

type StatsWorker struct {
	// contains filtered or unexported fields
}

StatsWorker handles participant stats

func (*StatsWorker) AddBuffer

func (s *StatsWorker) AddBuffer(trackID livekit.TrackID, buffer *buffer.Buffer)

func (*StatsWorker) Close

func (s *StatsWorker) Close()

func (*StatsWorker) OnDownstreamPacket added in v0.14.2

func (s *StatsWorker) OnDownstreamPacket(trackID livekit.TrackID, bytes int)

func (*StatsWorker) OnRTCP added in v0.14.2

func (s *StatsWorker) OnRTCP(trackID livekit.TrackID, direction livekit.StreamType, stats *livekit.AnalyticsStat)

func (*StatsWorker) RemoveBuffer

func (s *StatsWorker) RemoveBuffer(trackID livekit.TrackID)

func (*StatsWorker) Update added in v0.14.2

func (s *StatsWorker) Update()

type TelemetryReporter added in v0.15.2

type TelemetryReporter interface {
	Report(ctx context.Context, stats []*livekit.AnalyticsStat)
}

type TelemetryService

type TelemetryService interface {
	// stats
	AddUpTrack(participantID livekit.ParticipantID, trackID livekit.TrackID, buff *buffer.Buffer)
	OnDownstreamPacket(participantID livekit.ParticipantID, trackID livekit.TrackID, bytes int)
	HandleRTCP(streamType livekit.StreamType, participantID livekit.ParticipantID, trackID livekit.TrackID, pkts []rtcp.Packet)

	// 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)
	ParticipantLeft(ctx context.Context, room *livekit.Room, participant *livekit.ParticipantInfo)
	TrackPublished(ctx context.Context, participantID livekit.ParticipantID, track *livekit.TrackInfo)
	TrackUnpublished(ctx context.Context, participantID livekit.ParticipantID, track *livekit.TrackInfo, ssrc uint32)
	TrackSubscribed(ctx context.Context, participantID livekit.ParticipantID, track *livekit.TrackInfo)
	TrackUnsubscribed(ctx context.Context, participantID livekit.ParticipantID, track *livekit.TrackInfo)
	RecordingStarted(ctx context.Context, ri *livekit.RecordingInfo)
	RecordingEnded(ctx context.Context, ri *livekit.RecordingInfo)
}

func NewTelemetryService

func NewTelemetryService(notifier webhook.Notifier, analytics AnalyticsService) TelemetryService

type TelemetryServiceInternal added in v0.15.2

type TelemetryServiceInternal interface {
	TelemetryService
	SendAnalytics()
}

func NewTelemetryServiceInternal added in v0.15.2

func NewTelemetryServiceInternal(notifier webhook.Notifier, analytics AnalyticsService) TelemetryServiceInternal

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL