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:
@@ -21,6 +21,7 @@ import (
|
||||
"github.com/livekit/protocol/livekit"
|
||||
"github.com/livekit/protocol/logger"
|
||||
"github.com/livekit/protocol/webhook"
|
||||
"github.com/pion/turn/v2"
|
||||
"github.com/pkg/errors"
|
||||
"gopkg.in/yaml.v3"
|
||||
"os"
|
||||
@@ -72,7 +73,7 @@ func InitializeServer(conf *config.Config, currentNode routing.LocalNode) (*Live
|
||||
return nil, err
|
||||
}
|
||||
authHandler := newTurnAuthHandler(objectStore)
|
||||
server, err := NewTurnServer(conf, authHandler)
|
||||
server, err := newInProcessTurnServer(conf, authHandler)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -221,3 +222,7 @@ func createClientConfiguration() clientconfiguration.ClientConfigurationManager
|
||||
func getRoomConf(config2 *config.Config) config.RoomConfig {
|
||||
return config2.Room
|
||||
}
|
||||
|
||||
func newInProcessTurnServer(conf *config.Config, authHandler turn.AuthHandler) (*turn.Server, error) {
|
||||
return NewTurnServer(conf, authHandler, false)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user