Generate cleaner configs (#347)

Also upgrade to v1.17 for docker builds
This commit is contained in:
David Zhao
2022-01-17 23:54:04 -08:00
committed by GitHub
parent 0e74ce89c5
commit 88cad8f093
3 changed files with 34 additions and 34 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
FROM golang:1.16-alpine as builder FROM golang:1.17-alpine as builder
ARG TARGETPLATFORM ARG TARGETPLATFORM
ARG TARGETARCH ARG TARGETARCH
+1 -1
View File
@@ -28,7 +28,7 @@ func init() {
func main() { func main() {
app := &cli.App{ app := &cli.App{
Name: "livekit-server", Name: "livekit-server",
Usage: "distributed audio/video rooms over WebRTC", Usage: "High performance WebRTC server",
Description: "run without subcommands to start the server", Description: "run without subcommands to start the server",
Flags: []cli.Flag{ Flags: []cli.Flag{
&cli.StringFlag{ &cli.StringFlag{
+32 -32
View File
@@ -26,55 +26,55 @@ var DefaultStunServers = []string{
type Config struct { type Config struct {
Port uint32 `yaml:"port"` Port uint32 `yaml:"port"`
PrometheusPort uint32 `yaml:"prometheus_port"` PrometheusPort uint32 `yaml:"prometheus_port,omitempty"`
RTC RTCConfig `yaml:"rtc"` RTC RTCConfig `yaml:"rtc,omitempty"`
Redis RedisConfig `yaml:"redis"` Redis RedisConfig `yaml:"redis,omitempty"`
Audio AudioConfig `yaml:"audio"` Audio AudioConfig `yaml:"audio,omitempty"`
Room RoomConfig `yaml:"room"` Room RoomConfig `yaml:"room,omitempty"`
TURN TURNConfig `yaml:"turn"` TURN TURNConfig `yaml:"turn,omitempty"`
WebHook WebHookConfig `yaml:"webhook"` WebHook WebHookConfig `yaml:"webhook,omitempty"`
NodeSelector NodeSelectorConfig `yaml:"node_selector"` NodeSelector NodeSelectorConfig `yaml:"node_selector,omitempty"`
KeyFile string `yaml:"key_file"` KeyFile string `yaml:"key_file,omitempty"`
Keys map[string]string `yaml:"keys"` Keys map[string]string `yaml:"keys,omitempty"`
Region string `yaml:"region"` Region string `yaml:"region,omitempty"`
// LogLevel is deprecated // LogLevel is deprecated
LogLevel string `yaml:"log_level"` LogLevel string `yaml:"log_level,omitempty"`
Logging LoggingConfig `yaml:"logging"` Logging LoggingConfig `yaml:"logging,omitempty"`
Limit LimitConfig `yaml:"limit"` Limit LimitConfig `yaml:"limit,omitempty"`
Development bool `yaml:"development"` Development bool `yaml:"development,omitempty"`
} }
type RTCConfig struct { type RTCConfig struct {
UDPPort uint32 `yaml:"udp_port"` UDPPort uint32 `yaml:"udp_port,omitempty"`
TCPPort uint32 `yaml:"tcp_port"` TCPPort uint32 `yaml:"tcp_port,omitempty"`
ICEPortRangeStart uint32 `yaml:"port_range_start"` ICEPortRangeStart uint32 `yaml:"port_range_start,omitempty"`
ICEPortRangeEnd uint32 `yaml:"port_range_end"` ICEPortRangeEnd uint32 `yaml:"port_range_end,omitempty"`
NodeIP string `yaml:"node_ip"` NodeIP string `yaml:"node_ip,omitempty"`
// for testing, disable UDP // for testing, disable UDP
ForceTCP bool `yaml:"force_tcp"` ForceTCP bool `yaml:"force_tcp,omitempty"`
StunServers []string `yaml:"stun_servers"` StunServers []string `yaml:"stun_servers,omitempty"`
UseExternalIP bool `yaml:"use_external_ip"` UseExternalIP bool `yaml:"use_external_ip"`
// Number of packets to buffer for NACK // Number of packets to buffer for NACK
PacketBufferSize int `yaml:"packet_buffer_size"` PacketBufferSize int `yaml:"packet_buffer_size,omitempty"`
// Max bitrate for REMB // Max bitrate for REMB
MaxBitrate uint64 `yaml:"max_bitrate"` MaxBitrate uint64 `yaml:"max_bitrate,omitempty"`
// Throttle periods for pli/fir rtcp packets // Throttle periods for pli/fir rtcp packets
PLIThrottle PLIThrottleConfig `yaml:"pli_throttle"` PLIThrottle PLIThrottleConfig `yaml:"pli_throttle,omitempty"`
// Which side runs bandwidth estimation // Which side runs bandwidth estimation
UseSendSideBWE bool `yaml:"send_side_bandwidth_estimation"` UseSendSideBWE bool `yaml:"send_side_bandwidth_estimation,omitempty"`
CongestionControl CongestionControlConfig `yaml:"congestion_control"` CongestionControl CongestionControlConfig `yaml:"congestion_control,omitempty"`
} }
type PLIThrottleConfig struct { type PLIThrottleConfig struct {
LowQuality time.Duration `yaml:"low_quality"` LowQuality time.Duration `yaml:"low_quality,omitempty"`
MidQuality time.Duration `yaml:"mid_quality"` MidQuality time.Duration `yaml:"mid_quality,omitempty"`
HighQuality time.Duration `yaml:"high_quality"` HighQuality time.Duration `yaml:"high_quality,omitempty"`
} }
type CongestionControlConfig struct { type CongestionControlConfig struct {
@@ -117,8 +117,8 @@ type CodecSpec struct {
type LoggingConfig struct { type LoggingConfig struct {
JSON bool `yaml:"json"` JSON bool `yaml:"json"`
Level string `yaml:"level"` Level string `yaml:"level"`
Sample bool `yaml:"sample"` Sample bool `yaml:"sample,omitempty"`
PionLevel string `yaml:"pion_level"` PionLevel string `yaml:"pion_level,omitempty"`
} }
type TURNConfig struct { type TURNConfig struct {