Documentation
¶
Index ¶
- Variables
- func UpdateCurrentNodeStats(nodeStats *livekit.NodeStats) error
- type PacketStats
- func (s PacketStats) Copy() *PacketStats
- func (s *PacketStats) HandleRTCP(pkts []rtcp.Packet)
- func (s *PacketStats) IncrementBytes(bytes uint64)
- func (s *PacketStats) IncrementFIR(count uint64)
- func (s *PacketStats) IncrementNack(count uint64)
- func (s *PacketStats) IncrementPLI(count uint64)
- func (s *PacketStats) IncrementPackets(count uint64)
- type RoomStatsReporter
- func (r *RoomStatsReporter) AddParticipant()
- func (r *RoomStatsReporter) AddPublishedTrack(kind string)
- func (r *RoomStatsReporter) AddSubscribedTrack(kind string)
- func (r *RoomStatsReporter) RoomEnded()
- func (r *RoomStatsReporter) RoomStarted()
- func (r *RoomStatsReporter) SubParticipant()
- func (r *RoomStatsReporter) SubPublishedTrack(kind string)
- func (r *RoomStatsReporter) SubSubscribedTrack(kind string)
- type StatsBufferWrapper
- type StatsInterceptor
- type StatsInterceptorFactory
Constants ¶
This section is empty.
Variables ¶
var ( PromMessageCounter = prometheus.NewCounterVec( prometheus.CounterOpts{ Namespace: livekitNamespace, Subsystem: "node", Name: "messages", }, []string{"type", "status"}, ) )
Functions ¶
func UpdateCurrentNodeStats ¶
Types ¶
type PacketStats ¶
type PacketStats struct {
PacketBytes uint64 `json:"packetBytes"`
PacketTotal uint64 `json:"packetTotal"`
NackTotal uint64 `json:"nackTotal"`
PLITotal uint64 `json:"pliTotal"`
FIRTotal uint64 `json:"firTotal"`
// contains filtered or unexported fields
}
func (PacketStats) Copy ¶
func (s PacketStats) Copy() *PacketStats
func (*PacketStats) HandleRTCP ¶
func (s *PacketStats) HandleRTCP(pkts []rtcp.Packet)
func (*PacketStats) IncrementBytes ¶
func (s *PacketStats) IncrementBytes(bytes uint64)
func (*PacketStats) IncrementFIR ¶
func (s *PacketStats) IncrementFIR(count uint64)
func (*PacketStats) IncrementNack ¶
func (s *PacketStats) IncrementNack(count uint64)
func (*PacketStats) IncrementPLI ¶
func (s *PacketStats) IncrementPLI(count uint64)
func (*PacketStats) IncrementPackets ¶
func (s *PacketStats) IncrementPackets(count uint64)
type RoomStatsReporter ¶
type RoomStatsReporter struct {
Incoming *PacketStats
Outgoing *PacketStats
// contains filtered or unexported fields
}
RoomStatsReporter is created for each room
func NewRoomStatsReporter ¶
func NewRoomStatsReporter(roomName string) *RoomStatsReporter
func (*RoomStatsReporter) AddParticipant ¶
func (r *RoomStatsReporter) AddParticipant()
func (*RoomStatsReporter) AddPublishedTrack ¶
func (r *RoomStatsReporter) AddPublishedTrack(kind string)
func (*RoomStatsReporter) AddSubscribedTrack ¶
func (r *RoomStatsReporter) AddSubscribedTrack(kind string)
func (*RoomStatsReporter) RoomEnded ¶
func (r *RoomStatsReporter) RoomEnded()
func (*RoomStatsReporter) RoomStarted ¶
func (r *RoomStatsReporter) RoomStarted()
func (*RoomStatsReporter) SubParticipant ¶
func (r *RoomStatsReporter) SubParticipant()
func (*RoomStatsReporter) SubPublishedTrack ¶
func (r *RoomStatsReporter) SubPublishedTrack(kind string)
func (*RoomStatsReporter) SubSubscribedTrack ¶
func (r *RoomStatsReporter) SubSubscribedTrack(kind string)
type StatsBufferWrapper ¶
type StatsBufferWrapper struct {
CreateBufferFunc func(packetType packetio.BufferPacketType, ssrc uint32) io.ReadWriteCloser
Stats *PacketStats
}
StatsBufferWrapper wraps a buffer factory so we could get information on incoming packets
func (*StatsBufferWrapper) CreateBuffer ¶
func (w *StatsBufferWrapper) CreateBuffer(packetType packetio.BufferPacketType, ssrc uint32) io.ReadWriteCloser
type StatsInterceptor ¶
type StatsInterceptor struct {
interceptor.NoOp
// contains filtered or unexported fields
}
StatsInterceptor is created for each participant to keep of track of outgoing stats it adheres to Pion interceptor interface
func (*StatsInterceptor) BindLocalStream ¶
func (s *StatsInterceptor) BindLocalStream(_ *interceptor.StreamInfo, writer interceptor.RTPWriter) interceptor.RTPWriter
BindLocalStream lets you modify any outgoing RTP packets. It is called once for per LocalStream. The returned method will be called once per rtp packet.
func (*StatsInterceptor) BindRTCPWriter ¶
func (s *StatsInterceptor) BindRTCPWriter(writer interceptor.RTCPWriter) interceptor.RTCPWriter
BindRTCPWriter lets you modify any outgoing RTCP packets. It is called once per PeerConnection. The returned method will be called once per packet batch.
type StatsInterceptorFactory ¶ added in v0.13.1
type StatsInterceptorFactory struct {
// contains filtered or unexported fields
}
StatsInterceptorFactory is created for each participant to keep of track of outgoing stats it adheres to Pion interceptor.Factory interface
func NewStatsInterceptorFactory ¶ added in v0.13.1
func NewStatsInterceptorFactory(reporter *RoomStatsReporter) *StatsInterceptorFactory
func (*StatsInterceptorFactory) NewInterceptor ¶ added in v0.13.1
func (f *StatsInterceptorFactory) NewInterceptor(id string) (interceptor.Interceptor, error)