1
0
mirror of https://gitlab.crans.org/nounous/ghostream.git synced 2025-06-27 11:28:51 +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

@ -6,8 +6,8 @@ import (
"net/http"
"github.com/markbates/pkger"
"github.com/pion/webrtc/v3"
"gitlab.crans.org/nounous/ghostream/internal/monitoring"
"gitlab.crans.org/nounous/ghostream/stream/webrtc"
)
// Handle WebRTC session description exchange via POST
@ -90,5 +90,5 @@ func statisticsHandler(w http.ResponseWriter, r *http.Request) {
enc := json.NewEncoder(w)
enc.Encode(struct {
ConnectedViewers int
}{int(monitoring.GetGaugeValue(monitoring.WebRTCConnectedSessions))})
}{webrtc.GetNumberConnectedSessions()})
}