Region aware routing (#135)

* Region aware routing

* update config, fix spacing on commented out lines
This commit is contained in:
David Zhao
2021-10-06 21:40:04 -07:00
committed by GitHub
parent b0eca12ee8
commit c745f0a318
22 changed files with 406 additions and 113 deletions
+5 -2
View File
@@ -5,6 +5,7 @@ import (
"os"
"time"
"github.com/livekit/livekit-server/pkg/routing/selector"
"github.com/mitchellh/go-homedir"
"github.com/pion/webrtc/v3"
"github.com/pkg/errors"
@@ -29,6 +30,7 @@ type Config struct {
NodeSelector NodeSelectorConfig `yaml:"node_selector"`
KeyFile string `yaml:"key_file"`
Keys map[string]string `yaml:"keys"`
Region string `yaml:"region"`
LogLevel string `yaml:"log_level"`
Development bool `yaml:"development"`
@@ -109,8 +111,9 @@ type WebHookConfig struct {
}
type NodeSelectorConfig struct {
Kind string `yaml:"kind"`
SysloadLimit float32 `yaml:"sysload_limit"`
Kind string `yaml:"kind"`
SysloadLimit float32 `yaml:"sysload_limit"`
Regions []selector.RegionConfig `yaml:"regions"`
}
func NewConfig(confString string, c *cli.Context) (*Config, error) {