+4
-16
@@ -30,6 +30,7 @@ import (
|
||||
"github.com/livekit/mediatransportutil/pkg/rtcconfig"
|
||||
"github.com/livekit/protocol/logger"
|
||||
redisLiveKit "github.com/livekit/protocol/redis"
|
||||
"github.com/livekit/protocol/rpc"
|
||||
)
|
||||
|
||||
type CongestionControlProbeMode string
|
||||
@@ -71,7 +72,7 @@ type Config struct {
|
||||
Keys map[string]string `yaml:"keys,omitempty"`
|
||||
Region string `yaml:"region,omitempty"`
|
||||
SignalRelay SignalRelayConfig `yaml:"signal_relay,omitempty"`
|
||||
PSRPC PSRPCConfig `yaml:"psrpc,omitempty"`
|
||||
PSRPC rpc.PSRPCConfig `yaml:"psrpc,omitempty"`
|
||||
// LogLevel is deprecated
|
||||
LogLevel string `yaml:"log_level,omitempty"`
|
||||
Logging LoggingConfig `yaml:"logging,omitempty"`
|
||||
@@ -273,14 +274,6 @@ type SignalRelayConfig struct {
|
||||
StreamBufferSize int `yaml:"stream_buffer_size,omitempty"`
|
||||
}
|
||||
|
||||
type PSRPCConfig struct {
|
||||
Enabled bool `yaml:"enabled,omitempty"`
|
||||
MaxAttempts int `yaml:"max_attempts,omitempty"`
|
||||
Timeout time.Duration `yaml:"timeout,omitempty"`
|
||||
Backoff time.Duration `yaml:"backoff,omitempty"`
|
||||
BufferSize int `yaml:"buffer_size,omitempty"`
|
||||
}
|
||||
|
||||
// RegionConfig lists available regions and their latitude/longitude, so the selector would prefer
|
||||
// regions that are closer
|
||||
type RegionConfig struct {
|
||||
@@ -496,13 +489,8 @@ var DefaultConfig = Config{
|
||||
MaxRetryInterval: 4 * time.Second,
|
||||
StreamBufferSize: 1000,
|
||||
},
|
||||
PSRPC: PSRPCConfig{
|
||||
MaxAttempts: 3,
|
||||
Timeout: 500 * time.Millisecond,
|
||||
Backoff: 500 * time.Millisecond,
|
||||
BufferSize: 1000,
|
||||
},
|
||||
Keys: map[string]string{},
|
||||
PSRPC: rpc.DefaultPSRPCConfig,
|
||||
Keys: map[string]string{},
|
||||
}
|
||||
|
||||
func NewConfig(confString string, strictMode bool, c *cli.Context, baseFlags []cli.Flag) (*Config, error) {
|
||||
|
||||
Reference in New Issue
Block a user