turn packet and bytes stats used for telemetry and load control (#969)

* stats for turn

* add connections stats

* stats for standalone turn server only

* wire update
This commit is contained in:
cnderrauber
2022-08-31 11:00:27 +08:00
committed by GitHub
parent df189984f3
commit c401ca58af
5 changed files with 161 additions and 4 deletions
+6 -1
View File
@@ -11,6 +11,7 @@ import (
"github.com/go-redis/redis/v8"
"github.com/google/wire"
"github.com/pion/turn/v2"
"github.com/pkg/errors"
"gopkg.in/yaml.v3"
@@ -53,7 +54,7 @@ func InitializeServer(conf *config.Config, currentNode routing.LocalNode) (*Live
NewRTCService,
NewLocalRoomManager,
newTurnAuthHandler,
NewTurnServer,
newInProcessTurnServer,
NewLivekitServer,
)
return &LivekitServer{}, nil
@@ -195,3 +196,7 @@ func createClientConfiguration() clientconfiguration.ClientConfigurationManager
func getRoomConf(config *config.Config) config.RoomConfig {
return config.Room
}
func newInProcessTurnServer(conf *config.Config, authHandler turn.AuthHandler) (*turn.Server, error) {
return NewTurnServer(conf, authHandler, false)
}