1
0
mirror of https://gitlab.crans.org/nounous/ghostream.git synced 2025-06-27 19:12:07 +02:00

Do not read prometheus metrics

This commit is contained in:
Alexandre Iooss
2020-09-29 18:17:55 +02:00
parent 2005f3ece1
commit 078a74add1
4 changed files with 8 additions and 15 deletions

View File

@ -2,7 +2,6 @@ package webrtc
import (
"fmt"
"gitlab.crans.org/nounous/ghostream/internal/monitoring"
"io"
"log"
"math/rand"
@ -13,6 +12,7 @@ import (
"github.com/pion/webrtc/v3/pkg/media"
"github.com/pion/webrtc/v3/pkg/media/ivfreader"
"github.com/pion/webrtc/v3/pkg/media/oggreader"
"gitlab.crans.org/nounous/ghostream/internal/monitoring"
)
// Options holds web package configuration
@ -47,6 +47,11 @@ func removeTrack(tracks []*webrtc.Track, track *webrtc.Track) []*webrtc.Track {
return nil
}
// GetNumberConnectedSessions get the number of currently connected clients
func GetNumberConnectedSessions() int {
return len(videoTracks)
}
// newPeerHandler is called when server receive a new session description
// this initiates a WebRTC connection and return server description
func newPeerHandler(remoteSdp webrtc.SessionDescription, cfg *Options) webrtc.SessionDescription {